Skip to content

Commit cea65d7

Browse files
committed
ci: add an aggregate status check and name every job
Required status checks are matched by literal context string, and the ruleset on dev names four of them directly: test (3.10) through test (3.13). Two consequences. Renaming a job orphans a required check, which then waits forever for a name nothing reports. And the list drifts: 3.14 is in the matrix but not in the ruleset, so it has been non-blocking since it was added. Add a single `all checks passed` job that depends on the matrix. The ruleset can require that one context instead, leaving the matrix and the job names as repo-side concerns. Also name every job after what it does, which is safe to do in the same change now that no required context points at a matrix job: test -> run test suite on python 3.10 publish_code -> publish package and docker images tag_commit -> tag the release commit publish_docs -> publish the docs site test-distros -> install and smoke-test on fedora analyze -> scan python for security issues benchmark -> compare performance against the base branch cla -> check the CLA is signed update_docs -> regenerate the docs and open a PR update-nuclei-version -> open a PR when a new nuclei is released update-trufflehog-version -> open a PR when a new trufflehog is released This must merge before the ruleset is updated: a context is not selectable as a required check until it has reported at least once. Merging this alone changes nothing, the old required checks keep gating dev. The ruleset edit is a separate admin step, described in the PR.
1 parent cccc263 commit cea65d7

7 files changed

Lines changed: 29 additions & 1 deletion

File tree

.github/workflows/benchmark.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ permissions:
1717

1818
jobs:
1919
benchmark:
20+
name: compare performance against the base branch
2021
runs-on: ubuntu-latest
2122

2223
steps:

.github/workflows/cla.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ permissions:
1111

1212
jobs:
1313
cla:
14+
name: check the CLA is signed
1415
uses: blacklanternsecurity/CLA/.github/workflows/cla-reusable.yml@main
1516
secrets: inherit

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121

2222
jobs:
2323
analyze:
24-
name: Analyze (${{ matrix.language }})
24+
name: scan ${{ matrix.language }} for security issues
2525
# Runner size impacts CodeQL analysis time. To learn more, please see:
2626
# - https://gh.io/recommended-hardware-resources-for-running-codeql
2727
# - https://gh.io/supported-runners-and-hardware-resources

.github/workflows/distro_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ concurrency:
88

99
jobs:
1010
test-distros:
11+
name: install and smoke-test on ${{ matrix.os }}
1112
runs-on: ubuntu-latest
1213
container:
1314
image: ${{ matrix.os }}

.github/workflows/docs_updater.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
update_docs:
10+
name: regenerate the docs and open a PR
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/checkout@v7

.github/workflows/tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212

1313
jobs:
1414
test:
15+
name: run test suite on python ${{ matrix.python-version }}
1516
runs-on: ubuntu-latest
1617
strategy:
1718
# if one python version fails, let the others finish
@@ -51,7 +52,26 @@ jobs:
5152
token: ${{ secrets.CODECOV_TOKEN }}
5253
files: ./cov.xml
5354
verbose: true
55+
56+
# Single required status check. The ruleset requires this one context instead
57+
# of naming each matrix job, so changing the matrix or renaming a job becomes
58+
# a repo-side change that cannot orphan a required check.
59+
#
60+
# `if: always()` plus alls-green is deliberate: a bare `needs:` gate reports
61+
# success when a dependency is skipped or cancelled.
62+
all_checks:
63+
name: all checks passed
64+
if: always()
65+
needs: [test]
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: Fail unless every dependency succeeded
69+
uses: re-actors/alls-green@release/v1
70+
with:
71+
jobs: ${{ toJSON(needs) }}
72+
5473
publish_code:
74+
name: publish package and docker images
5575
needs: test
5676
runs-on: ubuntu-latest
5777
if: github.event_name == 'push' && (github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/stable')
@@ -200,6 +220,7 @@ jobs:
200220
outputs:
201221
BBOT_VERSION: ${{ steps.version.outputs.BBOT_VERSION }}
202222
tag_commit:
223+
name: tag the release commit
203224
needs: publish_code
204225
runs-on: ubuntu-latest
205226
if: github.event_name == 'push' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/dev')
@@ -222,6 +243,7 @@ jobs:
222243
git push origin "$VERSION"
223244
224245
publish_docs:
246+
name: publish the docs site
225247
runs-on: ubuntu-latest
226248
if: github.event_name == 'push' && (github.ref == 'refs/heads/stable' || github.ref == 'refs/heads/dev')
227249
steps:

.github/workflows/version_updater.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
update-nuclei-version:
10+
name: open a PR when a new nuclei is released
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/checkout@v7
@@ -59,6 +60,7 @@ jobs:
5960
author: blsaccess <info@blacklanternsecurity.com>
6061
assignees: "TheTechromancer"
6162
update-trufflehog-version:
63+
name: open a PR when a new trufflehog is released
6264
runs-on: ubuntu-latest
6365
steps:
6466
- uses: actions/checkout@v7

0 commit comments

Comments
 (0)