From 676d200580e58ca01954b7abc54a3990943fdc71 Mon Sep 17 00:00:00 2001 From: Cole Helbling Date: Wed, 29 May 2024 12:33:56 -0700 Subject: [PATCH] tests: make megajob block on failure GitHub Actions considers a "skipped" job successful for the purposes of required jobs for branch protections. We take advantage of this by failing if any dependent actions failed, or "skip" if they all succeeded. --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 702ed72..e3eaa48 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,13 @@ jobs: - install-nix-linux - install-nix-macos - install-with-non-default-source-inputs + # NOTE(cole-h): GitHub treats "skipped" as "OK" for the purposes of required checks on branch + # protection, so we take advantage of this fact and fail if any of the dependent actions failed, + # or "skip" (which is a success for GHA's purposes) if none of them did. + if: failure() steps: - - run: true + - name: Dependent checks failed + run: exit 1 check-dist-up-to-date: name: Check the dist/ folder is up to date