coverage publish
The 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]
One or more paths to the coverage reports to be uploaded. If no paths are specified, certain known locations will be tried.
--dry-run
Do not upload the coverage report, only export it to the output directory.
--report-format <REPORT_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
, lcov
, jacoco
and qlty
.
--tag
A tag to associate with this coverage report upload. Useful for filtering and identifying reports in the Qlty Cloud.
--override-build-id <OVERRIDE_BUILD_ID>
Override the build identifier from the CI environment.
--override-branch <OVERRIDE_BRANCH>
Override the branch from the CI environment.
--override-commit-sha <OVERRIDE_COMMIT_SHA>
Override the commit SHA from the CI environment.
--transform-add-prefix <TRANSFORM_ADD_PREFIX>
The prefix to add to file paths in coverage payloads, to make them match the project’s directory structure.
--transform-strip-prefix <TRANSFORM_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 current working directory.
-t, --token
The token to use for authentication when uploading the report. By default, it retrieves the
token from the QLTY_COVERAGE_TOKEN
environment variable.
--print
--json
-q, --quiet
Example
Upload a Cobertura report to Qlty Cloud: