Skip to content

Commit 3f0a4b6

Browse files
committed
CI: Add job to validate success of matrix
We would like to configure branch protection rules, so that a PR cannot be merged without CI passing. But configuring which checks need to pass can be tedious when adding and removing Ruby versions. But by adding one job that validates the success of the matrix, it becomes simple.
1 parent e51aa9c commit 3f0a4b6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/actions.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,18 @@ jobs:
3030
run: bundle exec rubocop --parallel
3131
- name: RSpec
3232
run: bundle exec rspec
33+
34+
success:
35+
name: Checks passing?
36+
needs: main
37+
if: always()
38+
runs-on: ubuntu-latest
39+
steps:
40+
- run: |
41+
if ${{ needs.main.result == 'success' }}
42+
then
43+
echo "All checks passed"
44+
else
45+
echo "Some checks failed"
46+
false
47+
fi

0 commit comments

Comments
 (0)