From 681c29a8fb0089d56671efc5f9016ccd7a85d33c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Cortier?= Date: Wed, 17 Jul 2024 08:21:23 -0400 Subject: [PATCH] ci: fix success job (#32) GitHub considers skipped jobs as fulfilling requirements when merging pull requests. We need to ensure that the success job fails if any previous job has failed. --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1bad095..2d1753c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,11 +64,17 @@ jobs: success: name: Success runs-on: ubuntu-latest - if: ${{ success() }} + if: ${{ always() }} needs: - formatting - checks steps: - name: CI succeeded + id: succeeded + if: ${{ !contains(needs.*.result, 'failure') }} run: exit 0 + + - name: CI failed + if: ${{ steps.succeeded.outcome == 'skipped' }} + run: exit 1