Skip to content

Commit

Permalink
Add a success job to CI
Browse files Browse the repository at this point in the history
This will allow us to enable auto merge once CI completes.
  • Loading branch information
tgross35 committed Aug 22, 2024
1 parent a6ed009 commit 046c772
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,21 @@ jobs:
rustup default nightly
- uses: Swatinem/rust-cache@v2
- run: cargo doc


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

0 comments on commit 046c772

Please sign in to comment.