Before you start
- You need the admin role on the project.
- The Qlty GitHub App must be installed on the repository. On GitHub Actions, it also needs the Workflows permission. That permission was added in September 2026, so if the app was installed earlier, an organization owner has to accept it. See Accepting new permissions.
- The project needs CI that runs automated tests. The agent adds a coverage upload step. It does not write tests.
Setting up coverage
Open the setup page
Go to Project Settings > Code Coverage and click Set up coverage. The page is also linked from the grey coverage shield on the project’s Overview and in the projects list, for any project with no coverage yet.The Automatic tab is selected by default.
Click Set up automatically
Qlty starts a build and takes you to its page. The build usually takes a few minutes. When it finishes, the build page shows the result with a link to the pull request.If the Qlty GitHub App is not installed on the repository, or it is missing the Workflows permission, the page says so. The message links to the GitHub page that fixes it.
Review the draft pull request
The pull request is titled Set up Qlty code coverage. Qlty requests a review from you when GitHub allows it, which requires you to be a collaborator on the repository. Its description is the agent’s report: what it changed, why, and anything you must do before merging.On GitHub Actions the upload authenticates with OIDC, so nothing is needed before merging. On other CI providers the pull request asks you to add a coverage token as a CI secret. Add it before merging.Check the pull request’s CI run for a successful upload. The upload step’s log shows a line like
Line Coverage: 84.2%.What the agent does
Qlty Cloud’s agent runs in an isolated build container with a copy of your default branch and no Git credentials. It reads the CI configuration and the test setup, then reads these docs and makes the smallest change that produces complete coverage:- Where coverage data is already generated, it adds only the upload step and points it at the existing output file.
- Where coverage data is not generated yet, it adds the minimum configuration to produce a report in a supported format, passing flags from the CI workflow rather than editing the project’s own scripts.
- Where a Qlty upload already exists, it repairs that upload if it is incomplete and otherwise makes no changes.
- Where several jobs or matrix entries produce different coverage, it uploads from each one and uses server-side merging. Where CI runs test suites selectively, it uses tags instead.
- On GitHub Actions it uses the Qlty GitHub Action with OIDC, and skips uploads on pull requests from forks, which have no OIDC token.
validate: false to get past a path validation error.
When the pull request’s CI fails
Pull request CI failing or no report arriving usually means a path or format detail the agent could not check without running the tests. From the setup page, choose Your agent to run Qlty’s open sourcesetup-coverage skill in your own coding agent. It can run your tests and iterate until CI passes. Or choose Manual and follow the Coverage Quick Start.
Which CI providers it supports
“Best effort” means the agent follows the same approach, but we have not verified the results across these providers. Review the pull request with extra care, and expect to add the coverage token before merging.
Build results
The build page shows one of these results:- Opened a pull request to set up code coverage. Review and merge it.
- No coverage changes were needed. Coverage is already set up and correct, or the repository has no CI or tests to add coverage to. The agent’s explanation is on the build page.
- Coverage setup did not finish. The run hit its cost or step limit, or ended with an error. Each run has a budget of 45 minutes. Start it again, or use Your agent or Manual setup.
- Could not open a pull request. Qlty could not push the branch or open the pull request on GitHub, usually because of a permission change. Check the GitHub App’s permissions and start it again.
Data processing
To set up coverage, Qlty sends the contents of your repository’s default branch to an AI subprocessor, currently Anthropic, together with your CI configuration and the Qlty docs the agent reads. The subprocessor does not train models on this data. See Data Usage. The agent runs with no Git or GitHub credentials, and it can only fetch pages fromdocs.qlty.sh, docs.github.com, and the CircleCI orb registry. The only way work leaves the container is the patch that Qlty turns into the pull request, which you review before anything runs on your default branch.
Next steps
- Coverage Quick Start for manual setup, or to understand what the pull request changed
- Coverage Tokens for OIDC and token authentication
- Troubleshooting Code Coverage if reports are sent but not arriving