Skip to content

Commit

Permalink
Add "all action stages" job to test-action.yml so nightly can fail.
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi committed Jul 14, 2024
1 parent a363991 commit d9b9adc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,24 @@ jobs:
run: |
echo "Error! The action should have failed because of the breaking change, but it has not."
exit 1
# We need this job so that the overall workflow is considered a success
# even if the nightly portions of the test have failed.
complete:
name: All action stages
runs-on: ubuntu-latest
needs:
- run-tests
if: ${{ success() || failure() }} # Run this job even if a dependency has failed.
steps:
- name: Job outcomes
run: |
echo "run-tests: ${{ needs.run-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.run-tests.result != 'success' }}
run: exit 1

0 comments on commit d9b9adc

Please sign in to comment.