You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{collectCoverage: true,coverageDirectory: "./coverage",coverageProvider: "v8",coverageReporters: ["lcov","text","json"],coverageThreshold: {// Attempt to fix the "Cannot convert undefined or null to object" issueglobal: {lines: 80,},}}
coverage folder
The following error happens on main and on pull requests based on the lates main (which has the workflow file as suggested)
Error Log
Begin collecting coverage...
Loading code coverage from file: coverage/coverage-final.json
Collecting coverage ended
Begin parsing coverage...
Parsing coverage ended
Base coverage collection ended
Begin switching back to original branch...
Not checked out to the original branch - failed to get it.
Switching back to original branch skipped
Switching back to original branch ended
Begin stages.checkthreshold...
stages.checkThreshold failed
Error: TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at Cd (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2197:3201)
at Z9 (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2197:3[64](https://github.com/storydocks/framily-ai/actions/runs/6517185484/job/17701432012#step:6:66)5)
at /home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2230:15551
at ei (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2221:164)
at UD (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2230:15505)
stages.checkThreshold ended
After adjusting based on exisiting issues we got this error
Begin collecting coverage...
Loading code coverage from file: coverage/report.json
Not checked out to the original branch - failed to get it.
Collecting coverage failed
Error: Coverage output file not found. (file "coverage/report.json" not found)
Error: Coverage output file not found. (file "coverage/report.json" not found)
at F7 (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2220:340)
at async ei (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2221:158)
at async Py (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2221:633)
at async /home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2230:1[49](https://github.com/storydocks/framily-ai/actions/runs/6517230793/job/17701518456#step:6:51)95
at async ei (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2221:1[58](https://github.com/storydocks/framily-ai/actions/runs/6517230793/job/17701518456#step:6:60))
at async UD (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:2230:14931)
Collecting coverage ended
It is unclear if or if or how this works in private repos, which steps are actually necessary and what might cause this error.
The docs are very vague and each adjustment leads to different errors which lead down a rabbit hole.
Frankly we decided to remove this action as it is not clear if this even works with our setup
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Question
Steps taken:
On
main
Provide a workflow with the suggested
pull_request_target
We also tried this:
where our jest config contains this
coverage folder
The following error happens on main and on pull requests based on the lates main (which has the workflow file as suggested)
Error Log
After adjusting based on exisiting issues we got this error
for this adjustment: (from here #388 (comment))
Conclusion
It is unclear if or if or how this works in private repos, which steps are actually necessary and what might cause this error.
The docs are very vague and each adjustment leads to different errors which lead down a rabbit hole.
Frankly we decided to remove this action as it is not clear if this even works with our setup
Beta Was this translation helpful? Give feedback.
All reactions