bjerkio/oidc-react

PR CodeCov comparison reports are broken

jamesdh opened this issue · 0 comments

When creating a PR, the @codecov bot generates a broken comparison with the following message:

No coverage uploaded for pull request base (main@...). The diff coverage is n/a.

Which is due to:

In order to produce an accurate coverage comparison, Codecov must have the coverage report for the pull request base.

Best Practice: Always fork a branch from a successful CI commit that has coverage uploaded, as illustrated below.

This issue occurs when the base commit (the parent commit of the first commit on the pull request) did not upload coverage and/or failed CI tests.

I'm guessing the fact that most PR's are merged via a squash commit is what may be breaking this, so we'll probably need a workflow job that regenerates test coverage after any push to main in order to fix this.