-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix up nightly corpus tests #22
Fix up nightly corpus tests #22
Conversation
This sets the `-o pipefail` behavior that you might expect to be a default (see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference). Without this setting, `go test -count=1 -v -tags corpus ./integration_tests/... | tail` will always return a success error code. Signed-off-by: Patrick Jakubowski <[email protected]>
…d run. Right now, the only other way to run the tests is to invoke them manually. If I'm running them against some experiment in my branch, I don't want to alert anybody about the failure. Signed-off-by: Patrick Jakubowski <[email protected]>
…led in some fatal way. Commit [b6e8040](cedar-policy/cedar-integration-tests@b6e8040) reduced the size of the tgz file by 25%, which was the likely culprit in reducing the size of the test suite. Signed-off-by: Patrick Jakubowski <[email protected]>
Signed-off-by: Patrick Jakubowski <[email protected]>
…edar-policy/cedar-go/pull/16/files). Signed-off-by: Patrick Jakubowski <[email protected]>
defaults: | ||
run: | ||
shell: bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting bash
here invokes the default -o pipefail
behavior that correctly makes it so that the go test -count=1 -v -tags corpus ./integration_tests/... | tail
fails when the tests fail.
@@ -26,7 +30,7 @@ jobs: | |||
run: go test -count=1 -v -tags corpus ./integration_tests/... | tail | |||
|
|||
- name: Notify on Failure | |||
if: failure() | |||
if: failure() && github.event_name == 'schedule' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We only want to be notified when this fails in the nightly run. Manual invocations shouldn't file an issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Short of a manual test of this here, it looks good.
You can see a successful run of the tests over in the StrongDM fork. |
Issue #, if available: None
Description of changes:
This PR causes the Github action to fail correctly when the corpus tests have failed such that our alerting will actually be invoked.
I've also pulled in the fixes from #16 so that the tests now pass.
I'd like to make additional changes to get these to run on every PR and to check in a copy of the tests to this repo and change the alerting to let us know when the tests are out of sync with the upstream version, but I'll save those for later. This at least gets us back to status quo.