Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b689783

Browse files
authoredAug 23, 2024
Merge pull request #218 from tgross35/ci-success
Add a `success` job to CI
2 parents a6ed009 + 0c368ee commit b689783

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
@@ -137,3 +137,20 @@ jobs:
137137
- uses: Swatinem/rust-cache@v2
138138
- run: cargo doc
139139

140+
success:
141+
needs:
142+
- clippy
143+
- test
144+
- cross_compile_test
145+
- ios_cross_compile_test
146+
- rustfmt
147+
- doc
148+
runs-on: ubuntu-latest
149+
# GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
150+
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
151+
# dependencies fails.
152+
if: always() # make sure this is never "skipped"
153+
steps:
154+
# Manually check the status of all dependencies. `if: failure()` does not work.
155+
- name: check if any dependency failed
156+
run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

0 commit comments

Comments
 (0)
Failed to load comments.