Merge pull request #569 from Kobzol/ci-check-success
CI: add a success conclusion job
This commit is contained in:
commit
bb30119076
1 changed files with 15 additions and 0 deletions
|
|
@ -128,3 +128,18 @@ jobs:
|
|||
run: |
|
||||
rustup set profile minimal && rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)" && rustup component add clippy
|
||||
- run: cargo clippy -- -D clippy::all
|
||||
|
||||
success:
|
||||
needs:
|
||||
- test
|
||||
- rustfmt
|
||||
- clippy
|
||||
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) }}'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue