GitHub Actions Workflow
Add the following job to your.github/workflows/…yaml
. It triggers on pushes to the mentioned branch in the yaml file:
-u <your_vcs_base_url>
to the upload script (e.g., -u https://github.enterprise.com
).
In case of monorepo add additional parameter -m module_name. You can upload multiple coverage files using the -m flag.
Don’t forget to add your access token to the repo secrets under the name “ACCESS_TOKEN”.
Token Permissions
The access token requires the following permissions:- Metadata: Read-only access
- Commit statuses: Read and write access

Coverage config file
You have to create a .coveragerc file in the project’s root folder to include all the source files in the test coverage calculation. Example:How it works
With the above configuration:- coverage run -m pytest tests/ will count every .py under the workspace as “valid” lines except for those in the omitted directories.
- Lines actually executed by your tests are marked “covered.”
- coverage xml -o coverage.xml produces a Cobertura-style report reflecting true coverage over the entire codebase.
- Using this coverage xml, we calculate the coverage percentage and the status check will be done on every new push to the branch.