GitHub Enforces Cobertura XML Format for Code Coverage Uploads

Original announcement: GitHub · 2026-11-23. Read the official announcement.

Summary of the New GitHub Code Coverage Upload Validation

On November 23, 2026, GitHub announced an update to the Code Quality upload-code-coverage action. This update improves the way code coverage reports are handled by requiring coverage uploads to be in the Cobertura XML format. Previously, uploads in unsupported formats appeared to succeed but failed to display coverage in pull requests, causing confusion.

What Changed and Why It Matters

The key changes introduced are:

  • The upload action now validates that coverage reports are in Cobertura XML format. If a report is detected to be in an invalid or unsupported format, the upload step will fail, and the workflow run logs will clearly indicate the error.
  • Previously, uploads with unsupported formats appeared successful but failed silently, resulting in no coverage data shown on pull requests.
  • The update also makes the processing of valid Cobertura reports more forgiving by:
    • Not rejecting reports due to minor structural issues.
    • Skipping lines without usable line numbers or hit counts rather than discarding the entire report.

Who Should Care

This change impacts developers and teams who use GitHub’s code coverage integration through the Code Quality action, particularly those:

  • Using GitHub Enterprise Cloud, GitHub Team, or GitHub Enterprise Cloud with data residency.
  • Integrating automated code coverage uploads into their CI/CD workflows.
  • Currently using coverage report formats other than Cobertura XML, which will now cause upload failures.

Note that this update does not apply to GitHub Enterprise Server users.

Recommended Actions for Developers

If your workflows begin failing with the error This file is not a Cobertura XML report. Upload a Cobertura XML report., consider the following steps:

  1. Verify your coverage report format. Ensure that your test framework outputs coverage reports in the Cobertura XML format.
  2. Configure your test tool or CI workflow. Adjust your test framework or preprocessing steps to convert existing coverage reports into Cobertura XML prior to uploading.
  3. Review workflow runs. Use the Actions logs to identify any invalid report format issues promptly, providing clear guidance to fix them.
  4. Maintain code quality settings. Ensure that GitHub Code Quality is enabled for your repository to leverage these enhancements.

Further Information

Developers should consult GitHub’s official documentation related to code coverage setup on GitHub Enterprise Cloud for detailed guidance on integrating coverage reports in the required format.

Practical Checklist

  1. Confirm your test suite outputs coverage in Cobertura XML.
  2. If needed, add a conversion step to produce Cobertura XML reports.
  3. Run workflows and monitor for coverage upload errors.
  4. Enable GitHub Code Quality on your repository if not already active.
  5. Update documentation and CI configuration to reflect the new format requirement.

Related Code Crushers coverage

Leave a Comment

Scroll to Top