Github action job doesn't fail on exit status 1 #26737
-
I have a Golang code that runs some integration tests. When it exits with status 1, the Github Actions job is still successful and continues running. Should it not fail the job? What determines if the job fails in Github Actions? Here is the link to the code:
Azure-Samples/Hybrid-Golang-Samples/blob/0fd65d23d5efd4fb6b5a3f5b026f69a842af9d88/dataplane/app.go#L126 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The issue turned out to be that I needed to obtain the last exit code from the calling application, which is PowerShell Core, and check the exit code and if it is non-zero, throw an error from that calling application in PowerShell core, otherwise Github Actions won’t register it as an error. |
Beta Was this translation helpful? Give feedback.
The issue turned out to be that I needed to obtain the last exit code from the calling application, which is PowerShell Core, and check the exit code and if it is non-zero, throw an error from that calling application in PowerShell core, otherwise Github Actions won’t register it as an error.