Skip to content

Commit f3ebfe1

Browse files
ci: add alls-green gate job for branch protection
Add a 'CI Success' job that depends on all other CI jobs (lint + test matrix) and uses re-actors/alls-green to determine the overall result. This single job can be set as a required status check in branch protection rules instead of tracking each matrix entry individually.
1 parent 6ab7f40 commit f3ebfe1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,17 @@ jobs:
6262

6363
- name: Test with coverage
6464
run: uv run pytest tests/ -q --cov=evalwire --cov-report=term-missing --cov-fail-under=85
65+
66+
# https://github.com/marketplace/actions/alls-green#why
67+
ci-success: # This job does nothing and is only used for the branch protection
68+
name: CI Success
69+
if: always()
70+
needs:
71+
- lint
72+
- test
73+
runs-on: ubuntu-latest
74+
steps:
75+
- name: Decide whether the needed jobs succeeded or failed
76+
uses: re-actors/alls-green@release/v1
77+
with:
78+
jobs: ${{ toJSON(needs) }}

0 commit comments

Comments
 (0)