From 5aa913edececbd1a10207ba6235151d743a03947 Mon Sep 17 00:00:00 2001 From: Jack Wrenn Date: Wed, 4 Oct 2023 00:37:02 +0000 Subject: [PATCH] [ci] invert the condition on all-jobs-succeeded 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. --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dc9ccb089..2207c081d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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