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
Here is the relevant part of my jest.config.js; coverage/coverage-final.json is generated by the json coverage reporter:
reporters: ['default',["jest-junit",{"outputDirectory": ".","outputName": "junit.xml","ancestorSeparator": " › ","uniqueOutputName": "false","suiteNameTemplate": "{filepath}","classNameTemplate": "{classname}","titleTemplate": "{title}"}],'jest-text-reporter',],collectCoverage: true,coverageReporters: [// List of reporters: https://istanbul.js.org/docs/advanced/alternative-reporters/'clover','lcov','text','text-summary','json','json-summary',],
The action fails this way:
Run ArtiomTr/jest-coverage-report-action@v2
with:
coverage-file: coverage/coverage-final.json
base-coverage-file: coverage/coverage-final.json
skip-step: all
github-token: ***
test-script: npx jest
icons: emoji
annotations: all
package-manager: npm
Run $GITHUB_ACTION_PATH/run.sh
$GITHUB_ACTION_PATH/run.sh
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
INPUT_GITHUB-TOKEN: ***
INPUT_TEST-SCRIPT: npx jest
INPUT_THRESHOLD:
INPUT_WORKING-DIRECTORY:
INPUT_ICONS: emoji
INPUT_ANNOTATIONS: all
INPUT_PACKAGE-MANAGER: npm
INPUT_SKIP-STEP: all
INPUT_CUSTOM-TITLE:
INPUT_COVERAGE-FILE: coverage/coverage-final.json
INPUT_BASE-COVERAGE-FILE: coverage/coverage-final.json
Running using node v16.15.0
Begin initialization stage...
Initialization stage ended
Begin stages.parsethreshold...
stages.parseThreshold ended
Begin head coverage collection...
Begin installing dependencies...
Installing dependencies skipped
Installing dependencies ended
Begin running tests...
Running tests skipped
Running tests ended
Begin collecting coverage...
Loading code coverage from file: coverage/coverage-final.json
Collecting coverage ended
Begin parsing coverage...
Parsing coverage ended
Head coverage collection ended
Begin switching to base branch...
Switching to base branch skipped
Switching to base branch ended
Begin base coverage collection...
Begin installing dependencies...
Installing dependencies skipped
Installing dependencies ended
Begin running tests...
Running tests skipped
Running tests ended
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...
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 mp (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:28:3134)
at bm (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:28:3537)
at /home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:1474
at Ge (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:51:162)
at Cw (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:1428)
stages.checkThreshold ended
Begin generating report...
Generating report failed
Error: TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
at Function.values (<anonymous>)
at F1 (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:28:4923)
at Qn (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:28:5065)
at Mm (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:37:25)
at Zm (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:49:261)
at /home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:1555
at Ge (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:51:162)
at Cw (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:1517)
Generating report ended
Begin report publish...
Report publish skipped
Report publish ended
Begin failed tests' annotations publication...
Failed tests' annotations publication skipped
Failed tests' annotations publication ended
Begin coverage annotations publication...
Coverage annotations publication failed
Error: TypeError: Cannot convert undefined or null to object
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at Wu (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:23:12780)
at /home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:2068
at Ge (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:51:162)
at Cw (/home/runner/work/_actions/ArtiomTr/jest-coverage-report-action/v2/dist/index.js:52:1970)
Coverage annotations publication ended
Error: Jest coverage report action failed
Error: Process completed with exit code 1.
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
-
Hi,
I'm trying to use your action. Here is how I call it:
Here is the relevant part of my
jest.config.js
;coverage/coverage-final.json
is generated by thejson
coverage reporter:The action fails this way:
What am I doing wrong?
Thanks for your help.
Beta Was this translation helpful? Give feedback.
All reactions