Running codecov in a node app using jest and circleCI results in error processing report
niks3089 opened this issue · 2 comments
niks3089 commented
I am trying to run codecov after running the test. I get a success message but when I follow the URL, I see an error:
This is the console output:
yarn test
yarn run v1.19.1
$ jest --coverage
jest-haste-map: Haste module naming collision: task-execute
PASS commandHelper.spec.js
PASS index.spec.js
Test Suites: 2 passed, 2 total
Tests: 9 passed, 9 total
Snapshots: 0 total
Time: 3.239s
Ran all test suites.
Done in 4.36s.
====>> Run codecov and upload the report
#!/bin/bash -eo pipefail
./node_modules/.bin/codecov --token=$CODECOV_TOKEN
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v3.6.1
==> Detecting CI Provider
Circle CI Detected
==> Configuration:
Endpoint: https://codecov.io
{ commit: 'ee7cda043fc98eeedfecd6783af3ebfcf58aefb4',
branch: 'cicd',
package: 'node-v3.6.1' }
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /root/repo -type f -name '*.gcno' -exec gcov {} +
==> Scanning for reports
X Failed to read file at
==> Uploading reports
Success!
View report at: https://codecov.io/github/niks3089/myrepo/commit/ee7cda043f
Success!
I see that the coverage folder created :
$ ls coverage/
base.css index.html packages prettify.js sorter.js
block-navigation.js namespace prettify.css sort-arrow-sprite.png
This is what I see when I click on the link:
Not sure what I am doing wrong. Any help on this is appreciated.
niks3089 commented
There was issue with jest
config and the coverage output was in html
. Once I changed it to json, it worked.
s1mrankaur commented
@niks3089 Tried changing from html to json and still broken for me.