Skip to content

Commit

Permalink
test: always run aggregate unit test check (#34903)
Browse files Browse the repository at this point in the history
When a shard of unit-tests.yml fails, we want the `success` job to be
maked "Failed" (not "Skipped"). That's because "Failed" blocks the PR
from merging, whereas "Skipped" does not. This change ensures that
`success` always runs to completion rather than being cancelled as soon
as a unit test shard fails or is cancelled.

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 4, 2024
1 parent 9caa2fa commit b063dfc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
success:
name: Unit tests successful
runs-on: ubuntu-20.04
if: always()
needs: [run-tests]
steps:
- name: Decide whether the needed jobs succeeded or failed
Expand Down

0 comments on commit b063dfc

Please sign in to comment.