Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail run upon error #28

Merged

Conversation

CasperWA
Copy link
Member

Fixes #25

set -e has been added to entrypoint.sh, so that any non-zero return value will stop the script.
Furthermore, an extra test for an invalid version value has been added.

@CasperWA CasperWA marked this pull request as ready for review September 11, 2020 14:21
@CasperWA
Copy link
Member Author

I have successfully added a CI job that is meant to fail, and only succeeds if it fails.
In more detail, this action is called with an invalid version, and it should therefore fail with an exit code other than 0. If this is not the case, the CI job will fail, otherwise it will succeed.

@CasperWA CasperWA changed the title Fail run upon error [BLOCKING] Fail run upon error Sep 11, 2020
@CasperWA
Copy link
Member Author

This PR is currently blocking for other PRs, since the added CI job has been made a requirement for merging into master.

@CasperWA CasperWA changed the title [BLOCKING] Fail run upon error Fail run upon error Sep 11, 2020
@CasperWA
Copy link
Member Author

This PR is currently blocking for other PRs, since the added CI job has been made a requirement for merging into master.

This is no longer true, however, upon merging this PR, the branch protection should be updated to include the new CI job.

@CasperWA
Copy link
Member Author

@ml-evs this is ready for review whenever :)

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM @CasperWA, thanks.

Comment on lines +137 to +140
- name: This runs ONLY if 'Run action' doesn't fail as expected
if: steps.action.outcome != 'failure' || steps.action.conclusion != 'success'
run: |
echo "Outcome: ${{ steps.action.outcome }} (not 'failure'), Conclusion: ${{ steps.action.conclusion }} (not 'success')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@CasperWA CasperWA merged commit df32600 into Materials-Consortia:master Sep 16, 2020
@CasperWA CasperWA deleted the fix_25_fail-run-upon-error branch September 16, 2020 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validator can fail without returning with a non-zero exit code
2 participants