Skip to content
Launchr Space Journal

Engineering Analysis · Global

When green tests hide a broken coverage upload

GitHub now rejects the wrong report format. Check that the file represents the same code your pull request changed.

By Launchr Space ·

Separate test results from coverage reporting: Run tests, then Check report, then Read the PR.
Illustrative workflow: separate test results from coverage reporting.

A team sees green checks on a pull request but no coverage summary. Those are two different facts: the test runner finished, but the coverage service may not have read its output. On November 23, GitHub said its Code Quality upload action now fails when it receives an unsupported format instead of making the upload appear successful. This is a change for repositories using GitHub Code Quality on eligible cloud plans, not a change to every test workflow on GitHub.

Start with the actual file

Open the workflow run and find the generator, the file it wrote, and the path passed to the uploader. The action expects Cobertura XML. An LCOV file does not become Cobertura when renamed, and a readable XML file is not necessarily a coverage report. If your runner can emit Cobertura directly, prefer that output; if you add a conversion step, check a few known line hit counts before trusting the converted report.

Make sure the lines refer to the same revision

A valid report can still be misleading if it describes the wrong source tree. In a monorepo, check how the reporter names paths when it runs from a package subdirectory. Compare one edited file in the pull request with its path and line numbers in the report. GitHub’s setup guide uses the pull request head to align line numbers with the diff and runs on the default branch to establish a baseline. Check both paths before treating the first coverage comment as evidence that the comparison works.

Prove the feedback is useful before making it mandatory

Pick a small internal pull request with a new branch that a test deliberately does not exercise. You want the test run to pass and the coverage view to show the missed branch or lines, as appropriate to the reporter. Then add the test and compare the two runs. Document which job owns coverage and where missing reports are diagnosed. Keep a report-format failure distinct from a decline in tested behavior; the right owner and the right fix are different.

Sources

Keep reading