Codecov "No coverage reports found" in CI
The Codecov uploader ran its search for coverage files and found nothing. Either the test step never wrote a report, it wrote it to a path the uploader does not scan, or coverage collection was not enabled.
What this error means
The Codecov step warns "No coverage reports found. Please make sure you're generating reports successfully." and uploads nothing.
['warning'] No coverage reports found. Please make sure you're generating reports successfully.Common causes
The test command did not produce a coverage file
Coverage flags were missing (no --cov, no --coverage, no JaCoCo report goal), so there is nothing on disk for the uploader to find.
The report is in a path the uploader does not search
The file exists but in a subdirectory or with a name outside Codecov's default search, so it is not discovered unless you point files: at it.
How to fix it
Generate the report, then name it for the uploader
- Run tests with coverage output enabled and confirm the file exists in the job.
- List the workspace before the upload to verify the path.
- Pass that exact path with
files:so the uploader does not have to guess.
- run: pytest --cov=src --cov-report=xml
- uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}Run upload in the directory that holds the report
For monorepos, set working-directory (or root_dir) so the uploader scans the subproject that actually produced coverage.
- uses: codecov/codecov-action@v5
with:
working-directory: ./packages/api
token: ${{ secrets.CODECOV_TOKEN }}How to prevent it
- Always enable coverage output in the test command before uploading.
- Verify the report path with a quick
lsstep while debugging. - Set
files:/working-directoryexplicitly in monorepos.