Skip to content

Commit b4ba3a8

Browse files
committed
ci: add test_success
1 parent a68c58a commit b4ba3a8

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

.github/workflows/rust-ci.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,22 @@ jobs:
8989
- name: cargo publish check spirv-tools
9090
run: cargo release patch --allow-branch=* --manifest-path spirv-tools/Cargo.toml
9191

92+
# This allows us to have a single job we can branch protect on, rather than needing
93+
# to update the branch protection rules when the test matrix changes
94+
test_success:
95+
runs-on: ubuntu-24.04
96+
needs: [lint, test, deny-check, publish-check]
97+
# Hack for buggy GitHub Actions behavior with skipped checks: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
98+
if: ${{ always() }}
99+
steps:
100+
# Another hack is to actually check the status of the dependencies or else it'll fall through
101+
- run: |
102+
echo "Checking statuses..."
103+
[[ "${{ needs.lint.result }}" == "success" ]] || exit 1
104+
[[ "${{ needs.test.result }}" == "success" ]] || exit 1
105+
[[ "${{ needs.deny-check.result }}" == "success" ]] || exit 1
106+
[[ "${{ needs.publish-check.result }}" == "success" ]] || exit 1
107+
92108
defaults:
93109
run:
94110
shell: bash

0 commit comments

Comments
 (0)