Skip to content

Commit

Permalink
test: fail aggregate check if any unit test shard fails
Browse files Browse the repository at this point in the history
This ensures that the `success` job in unit-tests.yml
always runs, allowing us to protect master from unit
test failures by making the `success` job required.

From https://github.com/marketplace/actions/alls-green#options:

> Important: For this to work properly, it is a must to have the job always run,
> otherwise GitHub will make it skipped when any of the dependencies fail. In
> some contexts, skipped is interpreted as success which may lead to undersired,
> unobvious and even dangerous (as in security breach "dangerous") side-effects.

Closes #34789
  • Loading branch information
kdmccormick authored Jun 3, 2024
1 parent a8434a7 commit c9a3a47
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jobs:
# https://github.com/orgs/community/discussions/33579
success:
name: Unit tests successful
if: always()
runs-on: ubuntu-20.04
needs: [ run-tests ]
steps:
Expand Down Expand Up @@ -202,3 +203,4 @@ jobs:
coverage report
coverage xml
- uses: codecov/codecov-action@v4
f

0 comments on commit c9a3a47

Please sign in to comment.