jest-coverage-report-action
jest-coverage-report-action copied to clipboard
"Yarn exited with code 1" after tests succeed
Describe a bug
Not seeing this in any open issues, but when running this action I get an error..
It happens right after the tests finish running successfully on PR branch, then again on base branch.
Ran all test suites.
[4940](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4940)
Test results written to: report.json
[4941](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4941)
error Command failed with exit code 1.
[4942](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4942)
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[4943](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4943)
Running tests failed
[4944](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4944)
Error: Error: The process '/usr/local/bin/yarn' failed with exit code 1
[4945](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4945)
Error: The process '/usr/local/bin/yarn' failed with exit code 1
[4946](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4946)
at jp._setResult (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:10:17263)
[4947](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4947)
at jp.CheckComplete (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:10:16853)
[4948](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4948)
at ChildProcess.<anonymous> (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:10:15846)
[4949](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4949)
at ChildProcess.emit (node:events:527:28)
[4950](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4950)
at maybeClose (node:internal/child_process:1092:16)
[4951](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4951)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
[4952](https://github.com/salesimpact/app/runs/6378251126?check_suite_focus=true#step:8:4952)
Our tests are succeeding, when I run the exact same test command locally I get exit code 0 so I'm not sure why in the cloud it is getting non-zero exit.
There are some tests being skipped, but I don't think that's the cause of this error.
Expected behavior
Tests continue
Details
-
Action version: @v2
-
OS, where your action is running (windows, linux): linux
-
action.yml file
```yml
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
package-manager: yarn
test-script: yarn jest
working-directory: frontend
skip-step: install
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
package-manager: yarn
test-script: yarn jest
working-directory: frontend
skip-step: install
-
Screenshots
<!-- If you encounter an incorrect coverage comment display, replace this comment with screenshot -->
![image](https://user-images.githubusercontent.com/716806/167730952-a23e4791-44ee-4050-812f-9d0cdb3d0c92.png)
Additional context
I'm having the same problem but with npm, have you found a solution to this problem?
@samcampisi my issue ended up being the same as this https://github.com/ArtiomTr/jest-coverage-report-action/discussions/249#discussioncomment-2359650