Skip to content

Commit 7ebcf5c

Browse files
authored
chore(ci): request CLI integration test by label (#35171)
### Reason for this change Enhance the CLI integration test workflow to provide more flexibility in triggering tests and better control over when integration tests run. ### Description of changes - **Add explicit trigger types**: Specify explicit event types (opened, synchronize, reopened, labeled, unlabeled) instead of using the default catch-all - **Enable manual triggering**: Allow integration tests to be triggered manually via the `pr/request-cli-integ-tests` label, even when no CLI-related files have changed - **Improve workflow logic**: Update the condition to check for both file changes OR the presence of the manual trigger label These changes provide maintainers with better control over when integration tests run, especially useful for testing scenarios where CLI changes might not be automatically detected or when manual testing is needed. ### Describe any new or updated permissions being added No new permissions are being added. This change only modifies workflow trigger conditions and logic. ### Description of how you validated changes - Reviewed the workflow syntax and logic - Verified that the label-based triggering condition is properly formatted - Confirmed that existing functionality (automatic triggering on CLI file changes) remains intact ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 88696e9 commit 7ebcf5c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/request-cli-integ-test.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
name: request-cli-integ-test
44
on:
5-
pull_request_target: {}
5+
pull_request_target:
6+
types:
7+
- opened
8+
- synchronize
9+
- reopened
10+
- labeled
11+
- unlabeled
612

713
jobs:
814
cli-changes:
@@ -28,7 +34,7 @@ jobs:
2834
submit-to-test-pipeline:
2935
environment: test-pipeline
3036
needs: cli-changes
31-
if: needs.cli-changes.outputs.any-changed-files == 'true'
37+
if: needs.cli-changes.outputs.any-changed-files == 'true' || contains(github.event.pull_request.labels.*.name, 'pr/request-cli-integ-tests')
3238
runs-on: ubuntu-latest
3339
steps:
3440
- name: Checkout

0 commit comments

Comments
 (0)