qlty coverage publish command uploads code coverage reports to Qlty Cloud for analysis. It supports multiple report formats to ensure compatibility with various programming languages, including simplecov, clover, cobertura, coverprofile, lcov, jacoco, and the generic qlty format.
Beyond uploading reports, this command allows the addition or removal of file path prefixes, tagging uploads for easier identification, and overriding the value of certain git-related variables. It integrates code coverage data into Qlty Cloud, offering a comprehensive view of your codebase’s coverage.
Arguments
[PATHS]...
[PATHS]...
One or more paths to the coverage reports to be uploaded
--dry-run
--dry-run
Do not upload the coverage report, only export it to the output directory
--format <FORMAT>
--format <FORMAT>
The format of the coverage report to transform. If not specified, the format will be inferred from the file extension or contents[possible values: simplecov, clover, cobertura, coverprofile, dotcover, lcov, jacoco, qlty, xccov-json]
--tag <TAG>
--tag <TAG>
A tag to associate with this coverage report upload
--override-build-id <OVERRIDE_BUILD_ID>
--override-build-id <OVERRIDE_BUILD_ID>
Override the build identifier from the CI environment
--override-branch <OVERRIDE_BRANCH>
--override-branch <OVERRIDE_BRANCH>
Override the branch from the CI environment
--override-commit-sha <OVERRIDE_COMMIT_SHA>
--override-commit-sha <OVERRIDE_COMMIT_SHA>
Override the commit SHA from the CI environment
--override-pr-number <OVERRIDE_PR_NUMBER>
--override-pr-number <OVERRIDE_PR_NUMBER>
Override the pull request number from the CI environment
--override-commit-time <OVERRIDE_COMMIT_TIME>
--override-commit-time <OVERRIDE_COMMIT_TIME>
Override the commit time from git metadata. Accepts a Unix timestamp (seconds since epoch) or RFC3339/ISO8601 format
--override-git-tag <OVERRIDE_GIT_TAG>
--override-git-tag <OVERRIDE_GIT_TAG>
Override the git tag from the CI environment
--add-prefix <ADD_PREFIX>
--add-prefix <ADD_PREFIX>
The prefix to add to file paths in coverage payloads, to make them match the project’s directory structure
--strip-prefix <STRIP_PREFIX>
--strip-prefix <STRIP_PREFIX>
The prefix to remove from absolute paths in coverage payloads to make them relative to the project root. This is usually the directory in which the tests were run. Defaults to the root of the git repository
-t, --token <TOKEN>
-t, --token <TOKEN>
The token to use for authentication when uploading the report. By default, it retrieves the token from the QLTY_COVERAGE_TOKEN environment variable
--project <PROJECT>
--project <PROJECT>
The name of the project to associate the coverage report with. Only needed when coverage token represents a workspace and if it cannot be inferred from the git origin
--name <NAME>
--name <NAME>
A name for the upload to help identify it for debugging purposes
--print
Print coverage
--verbose
--verbose
Verbose
-q, --quiet
-q, --quiet
Suppress all output except for errors
--total-parts-count <TOTAL_PARTS_COUNT>
--total-parts-count <TOTAL_PARTS_COUNT>
The total number of parts that qlty cloud should expect. Each call to qlty publish will upload one part. (The total parts count is per coverage tag e.g. if you have 2 tags each with 3 parts, you should set this to 3)
--no-validate
--no-validate
Disable validation of the coverage report before uploading it. By default, validation checks if the report is valid and minimum number of files are present
--validate-file-threshold <VALIDATE_FILE_THRESHOLD>
--validate-file-threshold <VALIDATE_FILE_THRESHOLD>
Custom threshold percentage for validation (0-100). Only applies when validation is enabled. Default is 90
--incomplete
--incomplete
Mark this upload as incomplete. This is useful when issuing multiple qlty coverage publish commands for the same coverage tag. The server will merge the uploads into a single report when qlty coverage complete is called
--selection
--selection
Mark this upload as coming from a selected subset of the test suite — e.g. only the tests affected by a pull request’s changes. Selected coverage contributes to diff coverage only and is excluded from total coverage
--skip-source-fetch
--skip-source-fetch
Skip fetching sources before publishing. Requires sources to be cached locallyWhen a remote source is not cached locally, publishing warns and falls back to the default configuration instead of fetching. Useful in CI where source fetching is unwanted or unavailable