We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
success
1 parent 9bd1af8 commit 1dff477Copy full SHA for 1dff477
.github/workflows/rust.yml
@@ -49,3 +49,17 @@ jobs:
49
rustup update --no-self-update
50
51
- run: cargo build
52
+
53
+ success:
54
+ needs:
55
+ - test
56
+ - msrv
57
+ runs-on: ubuntu-latest
58
+ # GitHub branch protection is exceedingly silly and treats "jobs skipped because a dependency
59
+ # failed" as success. So we have to do some contortions to ensure the job fails if any of its
60
+ # dependencies fails.
61
+ if: always() # make sure this is never "skipped"
62
+ steps:
63
+ # Manually check the status of all dependencies. `if: failure()` does not work.
64
+ - name: check if any dependency failed
65
+ run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'
0 commit comments