GitHub Actions; There was an error processing coverage reports

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.”

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.

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.

@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: https://github.com/serverless/utils/pull/110

1 Like

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