medikoo
September 2, 2021, 10:14am
1
Description
Report is uploaded but error ion Codecov website when I visit link as outputed by codecov I see " There was an error processing coverage reports."
There are just very general informations about potential error, so I’m not sure how to further debug it
Commit SHAs
2d621268a7f408100fd1716cd4a50cdb1026b700
Repository
CI/CD or Build URL
Uploader
npm “codecov” package → codecov - npm
Codecov Output
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v3.8.3
==> Detecting CI Provider
GitHub Actions CI Detected
==> Configuration:
Endpoint: https://codecov.io
{
commit: 'cbe9a01cf35455a9d9f4578c5694db1acb750f3c',
branch: '0902-log-plugin-writers',
package: 'node-v3.8.3'
}
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /home/runner/work/utils/utils -type f -name '*.gcno' -exec gcov {} +
Failed to run gcov command.
==> Scanning for reports
X Failed to read file at
==> Uploading reports
Success!
View report at: https://codecov.io/github/serverless/utils/commit/2d621268a7f408100fd1716cd4a50cdb1026b700
Expected Results
No error on website
Actual Results
On Codecov website when visiting report I see “There was an error processing coverage reports.”
ferdnyc
September 7, 2021, 6:03am
2
gcov
is a C/C++ coverage scanner, it can probably do some other compiled languages as well but I can’t imagine it would be able to scan JS code because there’s no compiler to output the .gcno
files it’s looking for and not finding. (Hence, I assume, the “failed to read file…” message that follows.)
If you want to collect JS coverage, there’s a codecov blog post about how to set that up on GitHub Actions.
ferdnyc
September 7, 2021, 6:04am
3
Yeah, from the gcov(1)
man page:
gcov works only on code compiled with GCC. It is not compatible with
any other profiling or test coverage mechanism.
medikoo
September 7, 2021, 6:48am
4
@ferdnyc in other JS repositories, relying on npx codecov
(no codecov/codecov-action@v1
action involved) just works.
I’ve looked into it closer and actually our config was messed up (no coverage was generated, so codecov couldn’t send anything meaningful).
I’ve just fixed that: CI: Fix coverage configuration by medikoo · Pull Request #110 · serverless/utils · GitHub
1 Like
ferdnyc
September 7, 2021, 7:05am
5
Yup, that did it! Looks like gcov
is still being run uselessly by default…
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
v3.8.3
==> Detecting CI Provider
GitHub Actions CI Detected
==> Configuration:
Endpoint: https://codecov.io
{
commit: '57a3ee636176552af0f47ed92c65ee6098200e74',
branch: 'master',
package: 'node-v3.8.3'
}
==> Building file structure
==> Generating gcov reports (skip via --disable=gcov)
$ find /home/runner/work/utils/utils -type f -name '*.gcno' -exec gcov {} +
Failed to run gcov command.
==> Scanning for reports
+ /home/runner/work/utils/utils/coverage/lcov.info
==> Uploading reports
Success!
But you could fix that with a --disable=gcov
. Though I don’t suppose it really matters.
1 Like