Free tool

GitHub code coverage workflow generator (Cobertura)

What it does

Choose your language and test runner, set the default branch and a label, and get a ready-to-edit GitHub Actions workflow that produces a Cobertura XML report and uploads it to GitHub Code Quality with actions/upload-code-coverage, including the permissions, triggers and fork guard GitHub recommends.

Use a different label for each upload in a monorepo. Generated locally in your browser; nothing is sent anywhere.

Choose a test runner.

What this generator does

On 23 November 2026 GitHub started validating the files sent to actions/upload-code-coverage. The action now accepts only Cobertura XML and fails the step with "This file is not a Cobertura XML report" for anything else, such as LCOV or Go cover profiles. Before the change, those uploads looked successful but no coverage appeared on pull requests. This page writes a starting workflow for your stack that produces a Cobertura file and uploads it.

Every generated workflow follows the structure of GitHub's own example. It runs on both push and pull_request for your default branch, because Code Quality compares pull request coverage with the default branch. It checks out the pull request head commit, so line numbers match the diff. It grants only contents: read and code-quality: write. And the upload step skips pull requests from forks. The file, language and label inputs are filled in for the runner you choose.

Treat the output as a draft. Check the setup action versions against their current major releases, add your own install and build steps, and confirm the report path your tool actually writes. Reporter names and default paths can change between major versions of a test tool. Code coverage needs GitHub Code Quality enabled on the repository, and is available on GitHub Team and Enterprise Cloud, not Enterprise Server.

For background on the change and how to tell a Cobertura file from other formats, read GitHub code coverage now rejects non-Cobertura reports.

FAQ

Is anything I type sent anywhere?

No. The workflow is assembled by plain JavaScript in this page. Nothing leaves your browser and nothing is stored.

Why is there no option for Java and JaCoCo?

JaCoCo writes its own XML format, not Cobertura, and the conversion depends on your build. GitHub's guide suggests the cover2cover.py script or a JaCoCo-to-Cobertura plugin for Gradle or Maven. Once you have a Cobertura file, the upload step is the same as in any generated workflow; set language: Java.

How do I upload several reports from one repository?

Run the upload action once per report, each with its own file and a distinct label, for example code-coverage/api-pytest and code-coverage/web-jest. They can live in separate jobs or in one job.

The upload still fails. What should I check?

Open the file the step uploads. A Cobertura report has a root <coverage> element. If the path is wrong, or a glob matched a different file, the action sees something else. For .NET, the coverlet file sits under a generated folder, so make sure the copy step found it.