Skip to content

Commit 0d6b3f1

Browse files
authored
Merge pull request #10 from nickroci/ci/ci-success-gate
ci: add ci-success aggregate gate
2 parents bc23cfb + 9c38820 commit 0d6b3f1

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,21 @@ jobs:
4848

4949
- name: Tests (pytest)
5050
run: uv run pytest
51+
52+
ci-success:
53+
# Single required check for branch protection. It goes green only when
54+
# every job above has succeeded, so protection on `main` can require
55+
# just this one context — adding/removing CI jobs never means editing
56+
# the protection settings. `if: always()` makes it run (and report
57+
# red) even when `build` fails or is cancelled, so it can't be skipped
58+
# past a failing matrix.
59+
name: ci-success
60+
if: always()
61+
needs: [build]
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Require all CI jobs to have passed
65+
run: |
66+
result="${{ needs.build.result }}"
67+
echo "build matrix result: $result"
68+
test "$result" = "success"

0 commit comments

Comments
 (0)