Skip to content

Commit 0c368ee

Browse files
committed
Add a success job to CI
This will allow us to enable auto merge once CI completes.
1 parent a6ed009 commit 0c368ee

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)