diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 31f8c55e..cf42d9e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,3 +63,17 @@ jobs: - name: Run tests run: cargo test --verbose + + # NOTE: In GitHub repository settings, the "Require status checks to pass + # before merging" branch protection rule ensures that commits are only merged + # from branches where specific status checks have passed. These checks are + # specified manually as a list of workflow job names. Thus we use this extra + # job to signal whether all CI checks have passed. + ci: + name: CI status checks + runs-on: ubuntu-latest + needs: build + if: always() + steps: + - name: Check whether all jobs pass + run: echo '${{ toJson(needs) }}' | jq -e 'all(.result == "success")'