Skip to content

Commit 236047e

Browse files
rix0rrrmrgraingithub-actions
authored
feat(cli-integ-tests): allow skipping integ tests with label (#801)
* feat(cli-integ-tests): allow skipping using a label Allows skipping the integ workflow if the label `pr/exempt-integ-test` is added. * Update src/cdk-cli-integ-tests.ts Co-authored-by: Momo Kornher <[email protected]> * chore: self mutation Signed-off-by: github-actions <[email protected]> --------- Signed-off-by: github-actions <[email protected]> Co-authored-by: Momo Kornher <[email protected]> Co-authored-by: github-actions <[email protected]>
1 parent def5bea commit 236047e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/cdk-cli-integ-tests.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { Component, github, javascript } from 'projen';
22

3+
const NOT_FLAGGED_EXPR = "!contains(github.event.pull_request.labels.*.name, 'pr/exempt-integ-test')";
4+
35
export interface CdkCliIntegTestsWorkflowProps {
46
/**
57
* Runners for the workflow
@@ -113,7 +115,7 @@ export class CdkCliIntegTestsWorkflow extends Component {
113115
},
114116
// Don't run again on the merge queue, we already got confirmation that it works and the
115117
// tests are quite expensive.
116-
if: "github.event_name != 'merge_group'",
118+
if: `github.event_name != 'merge_group' && ${NOT_FLAGGED_EXPR}`,
117119
steps: [
118120
{
119121
name: 'Checkout',
@@ -215,7 +217,7 @@ export class CdkCliIntegTestsWorkflow extends Component {
215217
},
216218
// Don't run again on the merge queue, we already got confirmation that it works and the
217219
// tests are quite expensive.
218-
if: "github.event_name != 'merge_group'",
220+
if: `github.event_name != 'merge_group' && ${NOT_FLAGGED_EXPR}`,
219221
strategy: {
220222
failFast: false,
221223
matrix: {

test/__snapshots__/cdk-cli-integ-tests.test.ts.snap

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)