Skip to content

Commit

Permalink
Make required jobs actually required. (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Mar 23, 2023
1 parent 02b41bd commit d29e4d4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,22 @@ jobs:
needs:
- lint
- rust-tests
if: ${{ success() || failure() }} # Run this job even if a dependency has failed.
steps:
- run: exit 0
- name: Job outcomes
run: |
echo "lint: ${{ needs.lint.result }}"
echo "rust-tests: ${{ needs.rust-tests.result }}"
# Fail this required job if any of its dependent jobs have failed.
#
# Do not attempt to consolidate these steps into one step, it won't work.
# Multi-line `if` clauses are not evaluated properly: see the intermediate commits in
# https://github.com/obi1kenobi/cargo-semver-checks/pull/405
- if: ${{ needs.lint.result != 'success' }}
run: exit 1
- if: ${{ needs.rust-tests.result != 'success' }}
run: exit 1

lint:
name: Check lint and rustfmt
Expand Down

0 comments on commit d29e4d4

Please sign in to comment.