Skip to content

Commit

Permalink
chore: fix ci PRs might get merged with failing tests (backport #1689) (
Browse files Browse the repository at this point in the history
#1690)

# Backport

This will backport the following commits from `main` to
`maintenance/v5.3`:
- [chore: fix ci PRs might get merged with failing tests
(#1689)](#1689)

<!--- Backport version: 9.5.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
  • Loading branch information
aws-cdk-automation and mrgrain authored Jul 29, 2024
1 parent cb75dc3 commit aa22542
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion projenrc/build-workflow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,18 @@ export class BuildWorkflow {
needs: ['matrix-test'],
permissions: {},
runsOn: ['ubuntu-latest'],
steps: [{ name: 'Done', run: 'echo OK' }],
if: 'always()',
steps: [
{
name: 'Build result',
run: 'echo ${{needs.matrix-test.result}}',
},
{
if: "${{ needs.matrix-test.result != 'success' }}",
name: 'Set status based on matrix build',
run: 'exit 1',
},
],
},
'package': {
env: { CI: 'true' },
Expand Down

0 comments on commit aa22542

Please sign in to comment.