Skip to content

Commit 22b1382

Browse files
fix: skip automatic upgrade tests execution on PRs to main (#382)
### Description Upgrade tests exclusions for automatic execution on PRs to main, etc. (defined here: https://github.com/splunk/addonfactory-workflow-addon-release/blob/main/.github/workflows/reusable-build-test-release.yml#L176) were not working because the condition for `run-upgrade-tests` job added in this PR was missing. Running upgrade tests automatically on all events the same way as other test types is not desired right now. As per current design, upgrade tests should be executed only when explicitly specified - by assigning `execute_upgrade` label. ### Checklist - [ ] `README.md` has been updated or is not required - [ ] push trigger tests - [ ] manual release test - [ ] automated releases test - [ ] pull request trigger tests - [ ] schedule trigger tests - [ ] workflow errors/warnings reviewed and addressed ### Testing done - all tests (including upgrade tests) automatically executed before implementing the fix: https://github.com/splunk/splunk-add-on-for-amazon-web-services/actions/runs/13540341896 - all tests (except upgrade tests) automatically executed after implementing the fix: https://github.com/splunk/splunk-add-on-for-google-cloud-platform/actions/runs/13545440706
2 parents 43d2dcc + da1fbb8 commit 22b1382

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/reusable-build-test-release.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,10 @@ on:
4848
["ubuntu:14.04", "ubuntu:16.04","ubuntu:18.04","ubuntu:22.04", "ubuntu:24.04", "redhat:8.4", "redhat:8.5", "redhat:8.6", "redhat:8.8"]
4949
upgrade-tests-ta-versions:
5050
required: false
51-
description: "List with TA versions (in 'X.X.X' format) that should be used as starting points for upgrade tests. If not provided,
52-
the latest TA version will be used. Example: ['7.6.0', '7.7.0']"
51+
description: "List with TA versions (in 'X.X.X' format) that should be used as starting points for upgrade tests. Example: ['7.6.0', '7.7.0']"
5352
type: string
5453
default: >-
55-
["latest"]
54+
[""]
5655
secrets:
5756
GH_TOKEN_ADMIN:
5857
description: Github admin token
@@ -2354,7 +2353,7 @@ jobs:
23542353
summary-ucc_modinput*
23552354
23562355
run-upgrade-tests:
2357-
if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.upgrade == 'true' }}
2356+
if: ${{ !cancelled() && needs.build.result == 'success' && needs.test-inventory.outputs.upgrade == 'true' && needs.setup-workflow.outputs.execute-upgrade-labeled == 'true' }}
23582357
needs:
23592358
- build
23602359
- test-inventory

0 commit comments

Comments
 (0)