Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit e52c833

Browse files
committed
ci: add test_success job
1 parent b9f8028 commit e52c833

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

.github/workflows/push.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
- name: Run a full build
6363
run: cargo xtask test-build --rust-gpu-version ${{ matrix.rust-gpu-version }}
6464

65-
lints:
65+
lint:
6666
runs-on: ubuntu-latest
6767
steps:
6868
- uses: actions/checkout@v4
@@ -73,6 +73,21 @@ jobs:
7373
- run: cargo fmt --check
7474
- run: cargo shear
7575

76+
# This allows us to have a single job we can branch protect on, rather than needing
77+
# to update the branch protection rules when the test matrix changes
78+
test_success:
79+
runs-on: ubuntu-24.04
80+
needs: [test-os, test-rust-gpu-releases, lint]
81+
# 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
82+
if: ${{ always() }}
83+
steps:
84+
# Another hack is to actually check the status of the dependencies or else it'll fall through
85+
- run: |
86+
echo "Checking statuses..."
87+
[[ "${{ needs.test-os.result }}" == "success" ]] || exit 1
88+
[[ "${{ needs.test-rust-gpu-releases.result }}" == "success" ]] || exit 1
89+
[[ "${{ needs.lint.result }}" == "success" ]] || exit 1
90+
7691
defaults:
7792
run:
7893
shell: bash

0 commit comments

Comments
 (0)