“There was an error processing coverage reports.” and CI reported coverage successfully

Description

CI completes successfully, and the Bash uploader completes without error. But when going to CodeCov, there’s no “CI Passed” badge, and the “There was an error processing coverage reports.” is all that’s shown on the page, with little to no information to figure out what went wrong.

Repository

Codecov: Codecov

Github: GitHub - couchbaselabs/node-ottoman: Node.js ODM for Couchbase

CI/CD

Github Actions: https://github.com/couchbaselabs/node-ottoman/runs/856022423?check_suite_focus=true#step:7:43

Uploader

Run codecov/codecov-action@v1
$ bash codecov.sh -n -F

Commit SHAs

https://codecov.io/upload/v4?package=bash-20200707-353aa93&token=secret&branch=master&commit=ef3fd711f196c4bc43e97a09299d0414bdd2db65&build=163881271&build_url=http%3A%2F%2Fgithub.com%2Fcouchbaselabs%2Fnode-ottoman%2Factions%2Fruns%2F163881271&name=&tag=&slug=couchbaselabs%2Fnode-ottoman&service=github-actions&flags=&pr=&job=&cmd_args=n,F

Thanks in advance for your great work. :tada:

1 Like

Hi @gsi-alejandro, I played around with this a little bit. The reason why we are unable to process your coverage report, is that all your files when you test lie under the lib/ directory. However, your files in version control are under src/. Was this done intentionally?

Hi, @tom .
Thanks for your time and quick attention.

The answer is yes; The tests and coverage are intentionally run on the lib folder because I want to test the compiled code, which is the one I finally deploy to npm.

In the src folder, the code is written in typescript and then it’s compiled to es2015 in the lib folder, to support nodejs users.

Maybe the problem is here:
the src folder is versioned (the .gitignore file excludes lib)
the lib folder is not versioned (the .npmignore file excludes src)

This way I keep the repository clean of generated code (lib) and the package npm does not contain the source code (src)

Is there a problem with this behavior?

Hello @tom
You were right I just change my test and coverage to src folder instead of lib and works like a charm.

Thanks a lot.

1 Like

Awesome, so glad it was an easy fix @gsi-alejandro!