Skip to content

Commit

Permalink
Add 'check' task to CI that makes sure everything is green.
Browse files Browse the repository at this point in the history
This allows to simply the branch protection steps, which in turn
makes it easier to upgrade CI without having to adjust the branch
protection conditions every time.

Signed-off-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
felixfontein committed Sep 19, 2024
1 parent b11e62a commit 2d42fcf
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,22 @@ jobs:
- name: Run tests
run: cargo test
working-directory: ./functional-tests

# The 'check' job should depend on all other jobs so it's possible to configure branch protection only for 'check'
# instead of having to explicitly list all individual jobs that need to pass.
check:
if: always()

needs:
- build
- test

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2
with:
allowed-failures: docs, linters
allowed-skips: non-voting-flaky-job
jobs: ${{ toJSON(needs) }}

0 comments on commit 2d42fcf

Please sign in to comment.