Skip to content

Commit

Permalink
Fail completed successfully check for failing Enos tests (hashicorp#2…
Browse files Browse the repository at this point in the history
…0335)

* Force required completed-successfully check to fail when builds or tests fail

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

* Update to fail cancelled workflows

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

---------

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
  • Loading branch information
Jaymala authored Apr 26, 2023
1 parent f4c8817 commit d766848
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ jobs:
secrets: inherit

completed-successfully:
# We force a failure if any of the dependent jobs fail,
# this is a workaround for the issue reported https://github.com/actions/runner/issues/2566
if: |
always() && (cancelled() ||
contains(needs.*.result, 'cancelled') ||
contains(needs.*.result, 'failure'))
runs-on: ubuntu-latest
needs:
- build-other
Expand All @@ -221,4 +227,6 @@ jobs:
- test
- test-docker-k8s
steps:
- run: echo "All required build and test workflows have succeeded!"
- run: |
echo "Some of the required build and test workflows have failed!"
exit 1

0 comments on commit d766848

Please sign in to comment.