Improving this feature. Please share feedback on our customer feedback dashboard.
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.
# [legend] P=CI-Passed, F=CI-Failed, .=No-CI-Ran # Illustration A master . F . . pull \ . . P # Base commit's CI failed therefore base report is invalid. # Resulting in "missing base report" ------------------------------------------------ # Illustration B master . . . . pull \ . . P # Base commit has no reports uploaded. # Resulting in "missing base report" ------------------------------------------------ # Illustration C master P pull \ . . P # Base and head commits passed CI and uploaded coverage to Codecov. # Resulting in a beautiful comment being posted.
Next: Read about Comparing Commits.
You will see an error stating
No coverage uploaded for pull request head. when the pull request has:
- not yet uploaded coverage results to Codecov;
- or the uploaded reports are from failed CI builds.
If your commit is showing author as "Unknown", here is how to fix it.
Your git provider (i.e. GitHub) is not returning the author id in the commit api result. This is because the email used to commit is not the same as your Github account.
Edit the user email found in your
[user] name = Your Name email = [email protected] # make sure the email is the same you login to Github
This issue is likely caused by the bot losing authentication to your project. Learn more Team Bot.
"Unusable report" can happen for a few reasons:
- The uploader wasn't able to find your source code. Normally the uploader will scan the git tree to assemble a list of files in your repo or check the directory If there isn't a
.gitdirectory found. This is because Codecov needs to find which file in your repo the report is referring to. If we find more than 1 match or no match, we cannot fully process coverage and discard the report to avoid inaccurate info.
- Paths don't match. So Codecov can't map the coverage data back to files in the repo see Our path fixing page to resolve.
- The report is actually empty - nothing was uploaded, so we just received the network and no coverage data.
To check if your uploaded report is empty (containing no coverage data) please download the reports by
clicking Download in the build logs. Look for the file by searching the string
# path=. Review each file to
confirm if coverage was properly collected.
- The report isn't coverage data. This may also trigger 'processing failed' though, but when Codecov receives something it cannot identify as coverage, it will indicate an error.
There are additional frequently asked questions linked here.
Updated about 1 month ago