Skip to content

Commit

Permalink
[ci] invert the condition on all-jobs-succeeded
Browse files Browse the repository at this point in the history
Previously, a failing job could cause all-jobs-succeeded to be
skipped, and branch protections interpreted a skipped job as
being vacuously successful. This failure mode caused #454 to be
merged to main, despite failing many CI checks.

This PR inverts the `if` condition of this job: It only runs on
failure, and upon failure, it fails.
  • Loading branch information
jswrenn committed Oct 4, 2023
1 parent 78062fc commit 5aa913e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,11 @@ jobs:
cargo kani setup &> /dev/null || true
# Used to signal to branch protections that all other jobs have succeeded.
all-jobs-succeed:
name: All checks succeeded
if: success()
no-jobs-failed:
name: No checks failed
if: failure()
runs-on: ubuntu-latest
needs: [build_test, kani, check_fmt, check_readme, check_msrv, check_versions, generate_cache]
steps:
- name: Mark the job as successful
run: exit 0
- name: Mark the job as unsuccessful
run: exit 1

0 comments on commit 5aa913e

Please sign in to comment.