Skip to content

Commit b793141

Browse files
committed
📦👷 Add pass job to consolidate status checks
Add a single "pass" job that depends on all CI jobs to enable GitHub's "merge when pass" feature. This approach makes it easier to add/remove required jobs without affecting the status of previously merged PRs, which would otherwise show as pending when new requirements are added.
1 parent ace8ced commit b793141

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎project_name/.github/workflows/ci.yml.jinja‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,19 @@ jobs:
201201
[ $((result & 16)) -ne 0 ] && echo "::warning ::Pylint convention(s) found"
202202
[ $((result & 32)) -ne 0 ] && echo "::error ::Pylint usage error"
203203
exit $((result & 35))
204+
205+
pass:
206+
if: always()
207+
needs: [
208+
{{ "ruff-format" if format_tool == "ruff" else format_tool }},
209+
ruff-check,
210+
pre-commit,
211+
mypy,
212+
test,
213+
pylint,
214+
]
215+
runs-on: ubuntu-latest
216+
steps:
217+
- uses: re-actors/alls-green@release/v1
218+
with:
219+
jobs: {% raw %}${{ toJSON(needs) }}{% endraw %}

0 commit comments

Comments
 (0)