Continuous Integration (CI) Tools

Request early access

This page describes features that are in private beta. Request early access to get them sooner.

Qlty CLI integrates seamless into your CI/CD pipeline. Below are templates for popular CI/CD providers to help you get started.

Your project’s code coverage settings page provides specific examples per language to suit your needs.

Github Actions

Use Qlty’s official Github Action.

1- uses: qltysh/qlty-action/coverage@main
2 with:
3 coverage-token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
4 files: PATH # e.g. coverage/lcov.info

Circle CI

Integrate it into your .circleci/config.yml file.

1coverage:
2 docker:
3 - image: cimg/base:stable
4 steps:
5 - checkout
6 - run: curl https://qlty.sh | sh
7 - run: qlty coverage publish PATH # e.g. coverage/lcov.info

Travis

Add it to your .travis.yml.

1before_script:
2 - curl https://qlty.sh | sh
3 - qlty coverage publish PATH # e.g. coverage/lcov.info

Buildkite

Add it to your pipeline.yml.

1steps:
2 - label: "Download and setup qlty"
3 commands:
4 - "curl https://qlty.sh | sh"
5
6 - label: "Upload coverage report to Qlty Cloud"
7 commands:
8 - "qlty coverage publish PATH" # e.g. coverage/lcov.info

Other CI systems

For uploading a code coverage report from virtually any location:

1

Locate the coverage report generated by your code coverage tool. This report is typically part of the output from running automated tests, such as unit tests, configured to monitor code coverage.

2

Retrieve your Qlty coverage token from your project’s settings page under the Code Coverage section.

3

Use the Qlty CLI to upload your report:

$curl https://qlty.sh | sh
  • Upload your code coverage report
$QLTY_COVERAGE_TOKEN=your_token qlty publish PATH

Checkout the coverage publish command’s documentation for more information.

Qlty CLI will attempt to infer the git commit SHA and branch from the environment. If it cannot determine this, it will prompt you for manual specification, which can be achieved using the --override-commit-sha and --override-branch configuration flags.ps>

For a full list of options to configure your coverage upload, run the following command: qlty coverage publish --help