summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2022-09-29 01:44:25 +0200
committerGitHub <noreply@github.com>2022-09-29 00:44:25 +0100
commita0fac9829c6059b66c0be6070b4d39a4ca90ae86 (patch)
treee872c8c1473ba4d65d1f08b84e9075cc0d0fd34b /.github
parent0a21080411c25acfb87fbc380631806e0477d7d3 (diff)
downloadpip-a0fac9829c6059b66c0be6070b4d39a4ca90ae86.tar.gz
Introduce a `check` CI job for branch protection (#11434)
This patch adds a special check-job that produces a clear failure or success status based on how the dependent jobs are doing. It is possible to use it in GitHub's branch protection instead of having to manually add and remove individual job names via the repo settings. https://github.com/marketplace/actions/alls-green#why
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml31
1 files changed, 31 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index c43b7dabb..0f0d0a9bb 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -284,3 +284,34 @@ jobs:
-m integration
--verbose --numprocesses auto --showlocals
--durations=5
+
+ check: # This job does nothing and is only used for the branch protection
+ if: always()
+
+ needs:
+ - determine-changes
+ - docs
+ - packaging
+ - pre-commit
+ - tests-unix
+ - tests-windows
+ - tests-zipapp
+ - tests-importlib-metadata
+ - vendoring
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Decide whether the needed jobs succeeded or failed
+ uses: re-actors/alls-green@release/v1
+ with:
+ allowed-skips: >-
+ ${{
+ (
+ needs.determine-changes.outputs.vendoring != 'true'
+ && github.event_name == 'pull_request'
+ )
+ && 'vendoring'
+ || ''
+ }}
+ jobs: ${{ toJSON(needs) }}