A GitHub Actions job can pass its tests and still fail when it uploads the coverage report. GitHub has updated the upload-code-coverage action for GitHub Code Quality to reject files outside Cobertura XML. Previously a step could look successful even though no coverage appeared in the pull request. The updated check reports the format problem in the workflow log. GitHub’s Nov. 23 changelog

Check what your test runner wrote

Start with the upload step’s file setting and match it to the output from your test tool. A file intended for another service may be valid coverage data in LCOV or another format. Renaming it does not change its contents. Configure your tool to generate Cobertura XML or put a supported conversion step between the test run and the upload. Check where the report lands relative to the workflow’s working directory. GitHub’s configuration guide

GitHub’s docs list output options for tools including pytest-cov and Istanbul. A repository that deliberately creates more than one report can keep those existing outputs while directing the Code Quality upload to the Cobertura version. Rerun the workflow and check the test command and upload step separately so you know which part succeeded. Framework examples

Check the comparison branch too

GitHub Code Quality compares pull-request coverage with the default branch. Its setup guide calls for a workflow that runs on both pull requests and pushes to the default branch, so there is a baseline to compare against. If a valid upload succeeds but the comparison is missing, confirm the baseline workflow has run. GitHub’s baseline setup

GitHub says it also relaxed handling of minor issues in valid Cobertura files and now skips individual lines without usable data. The feature requires GitHub Code Quality on an eligible Team or Enterprise Cloud repository. GitHub’s changelog says the change does not apply to GitHub Enterprise Server. Format validation and availability