Skip to content

Commit

Permalink
CI: Add a all-green job for branch protection rules
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Dec 14, 2022
1 parent a5461e1 commit 6ca7077
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
test-manylinux:
name: Manylinux Test Suite
runs-on: ${{ matrix.os }}
needs: [test]
needs: [lint]
strategy:
fail-fast: ${{ !contains(github.event.pull_request.labels.*.name, 'CI-no-fail-fast') }}
matrix:
Expand Down Expand Up @@ -280,3 +280,19 @@ jobs:
args: -m ${{ matrix.platform.test-crate }}/Cargo.toml -i python3.8
manylinux: ${{ matrix.platform.manylinux }}
target: ${{ matrix.platform.target }}

all-green:
needs:
- lint
- test
- test-manylinux
if: always()
runs-on: ubuntu-latest
steps:
- name: Result
run: |
jq -C <<< "${needs}"
# Check if all needs were successful or skipped.
"$(jq -r 'all(.result as $result | (["success", "skipped"] | contains([$result])))' <<< "${needs}")"
env:
needs: ${{ toJson(needs) }}

0 comments on commit 6ca7077

Please sign in to comment.