Skip to content

Commit 9c2dee9

Browse files
authored
Merge pull request rust-lang#299 from tgross35/ci-success
Add a `success` job to CI
2 parents 300edb3 + cfe75ca commit 9c2dee9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/main.yml

+17
Original file line numberDiff line numberDiff line change
@@ -71,3 +71,20 @@ jobs:
7171
- name: Install Rust
7272
run: rustup update nightly && rustup default nightly
7373
- run: cargo bench --all
74+
75+
success:
76+
needs:
77+
- docker
78+
- rustfmt
79+
- wasm
80+
- cb
81+
- benchmarks
82+
runs-on: ubuntu-latest
83+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
84+
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
85+
# dependencies fails.
86+
if: always() # make sure this is never "skipped"
87+
steps:
88+
# Manually check the status of all dependencies. `if: failure()` does not work.
89+
- name: check if any dependency failed
90+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)