When tests fail during `github-action@v3` the step does not emit failure exit code
See original GitHub issueI’m executing parallelized tests recorded to the Cypress Dashboard using github-action@v3
Functionally everything works perfectly and as expected with the single exception that when tests fail the github-action@v3
step in my workflow appear with a grey checkmark instead of the expected red X. Thus that workflow run appears to have passed with a green checkmark when reviewing my Github workflow run history.
WORKS:
- The Cypress test are successfully executed in parallel
- Cypress successfully adds PR comments when the test execution has completed
- The correct pass/fail results are present in the PR comment
- The PR comment links to the correct Cypress Dashboard run
github-action@v3
logs all have the correct pass/fail resultsgithub-action@v3
logs all link to the correct Cypress Dashboard run
DOES NOT WORK:
github-action@v3
step looks like it passed even though it should have failed because there are failed tests
Workflow run showing cypress (chrome, 6)
with a green checkmark, and github-action@v3
with a checkmark.
Expanding github-action@v3
and it clearly includes failed tests but does not include a failure exit for the step.
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Setting exit codes for actions - GitHub Docs
You can use exit codes to set the status of an action. GitHub displays statuses to indicate passing or failing actions.
Read more >No output on “Process completed with exit code 1” · Issue #1279
According to my troubleshooting, the error seems was returned by a certain command line in the called .sh script.
Read more >Properly show continue-on-error jobs/steps in PR UI #15452
I do not want the job to cause other pull requests or CI workflows on main branches to reflect as "failing" or "failed"...
Read more >Failing unit tests does not abort the action · Issue #119 - GitHub
I noticed in the job logs that my unit tests failed, but the action continued, making it seem that the check passed. But...
Read more >Error: The process '/usr/bin/git' failed with exit code 128 · Issue ...
The issue in our case was with the auth token that gets generated for each run that the checkout action uses by default...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@admah Sorry for the delay, I’m confirming the way we were using Cypress Module API was the root cause of my issues.
Unsure how to make this better, but some comments:
@cgraham-rs , appreciate it for making me take a look again. I was doing console.log instead of console.error. The solution worked for me. Thank you.