Skip to content

GitHub now catches code coverage uploads that silently failed

The upload-code-coverage action rejects anything that is not Cobertura XML, with a clear error, instead of reporting success and showing no coverage on the PR.

Source: GitHub

GitHub’s upload-code-coverage action now checks that a coverage report is actually Cobertura XML before accepting it. Until 23 November, a report in the wrong format would upload without error, then simply show no coverage on the pull request, with nothing in the workflow log to explain why.

Now a bad upload fails outright, with the message “This file is not a Cobertura XML report. Upload a Cobertura XML report.” GitHub also loosened the other side of the check: a report with minor structural problems is no longer rejected wholesale, and lines missing a line number or hit count are skipped individually rather than discarding the whole file.

This requires GitHub Code Quality, and is available on GitHub Enterprise Cloud and GitHub Team, including data residency, but not Enterprise Server.

Why it matters: if your pipeline has been uploading coverage in something other than Cobertura format, this is the first time you will actually hear about it. Worth checking your coverage step after this ships, since what was a quiet no-op before may now be a failing build.

Share

More from The Wire

All briefs