From acdbac25057abd938c2e23b39a215ff6345ba659 Mon Sep 17 00:00:00 2001 From: Ramana Reddy Date: Thu, 8 Aug 2024 12:43:13 +0530 Subject: [PATCH 1/2] update build workflow --- .github/workflows/build-test.yml | 3 +++ cmd/integration-test/integration.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index daf4e97..e6bf180 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -39,6 +39,9 @@ jobs: SLACK_WEBHOOK_URL: "${{ secrets.SLACK_WEBHOOK_URL }}" CUSTOM_WEBHOOK_URL: "${{ secrets.CUSTOM_WEBHOOK_URL }}" run: | + if [ "$GITHUB_ACTOR" == "dependabot[bot]" ]; then + export DEPENDABOT=true + fi chmod +x gotify.sh chmod +x action-run.sh bash action-run.sh diff --git a/cmd/integration-test/integration.go b/cmd/integration-test/integration.go index cda8431..de333ff 100644 --- a/cmd/integration-test/integration.go +++ b/cmd/integration-test/integration.go @@ -13,6 +13,7 @@ import ( var ( providerConfig = flag.String("provider-config", "", "provider config to use for testing") debug = os.Getenv("DEBUG") == "true" + isDependabot = os.Getenv("DEPENDABOT") == "true" errored = false success = aurora.Green("[✓]").String() failed = aurora.Red("[✘]").String() @@ -32,6 +33,10 @@ func main() { flag.Parse() for name, test := range testCases { + // run only gotify test for dependabot + if isDependabot && !(name == "gotify") { + continue + } fmt.Printf("Running test cases for \"%s\"\n", aurora.Blue(name)) err := test.Execute() if err != nil { From c4d84ed1661c41014485d3be8cbf0f314d5628e8 Mon Sep 17 00:00:00 2001 From: Ramana Date: Thu, 8 Aug 2024 13:31:49 +0530 Subject: [PATCH 2/2] misc update --- cmd/integration-test/integration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/integration-test/integration.go b/cmd/integration-test/integration.go index de333ff..f928d94 100644 --- a/cmd/integration-test/integration.go +++ b/cmd/integration-test/integration.go @@ -34,7 +34,7 @@ func main() { for name, test := range testCases { // run only gotify test for dependabot - if isDependabot && !(name == "gotify") { + if isDependabot && name != "gotify" { continue } fmt.Printf("Running test cases for \"%s\"\n", aurora.Blue(name))