1. deepsource/test-coverage@1.1.0

deepsource/test-coverage@1.1.0

Partner
Sections
Upload test coverage reports to DeepSource to track test coverage and see which lines are not covered by tests yet. DeepSource is an automated code review tool that helps developers find and fix bugs in their code.
Created: May 29, 2019Version Published: October 14, 2020Releases: 2
Org Usage:
< 25

Orb Quick Start Guide

Use CircleCI version 2.1 at the top of your .circleci/config.yml file.

1 version: 2.1

Add the orbs stanza below your version, invoking the orb:

1 2 orbs: test-coverage: deepsource/test-coverage@1.1.0

Use test-coverage elements in your existing workflows and jobs.

Opt-in to use of uncertified orbs on your organization’s Security settings page.

Usage Examples

report_python_coverage

Example usage of DeepSource test-coverage orb

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 version: '2.1' orbs: deepsource: deepsource/test-coverage jobs: run-test: docker: - image: cimg/python:3.8.5 steps: - checkout - run: pytest --cov --cov-report=xml - deepsource/report: coverage-file: ./coverage.xml dsn: ${DEEPSOURCE_DSN} key: python workflows: null

Commands

report

Report the test coverage file generated after running the tests to DeepSource.

Show command Source
PARAMETER
DESCRIPTION
REQUIRED
DEFAULT
TYPE
coverage-file
Path to the coverage data file. e.g. ./coverage.xml
No
''
string
dsn
DeepSource DSN of this repository. It is available under Settings → Reporting tab of the repository page on DeepSource.
No
${DEEPSOURCE_DSN}
string
key
Programming language shortcode for which coverage is reported. Supported languages are — go, javascript, python, ruby
No
''
string

Orb Source

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 # This code is licensed from CircleCI to the user under the MIT license. # See here for details: https://circleci.com/developer/orbs/licensing version: 2.1 description: | Upload test coverage reports to DeepSource to track test coverage and see which lines are not covered by tests yet. DeepSource is an automated code review tool that helps developers find and fix bugs in their code. display: home_url: https://deepsource.io/ source_url: https://github.com/deepsourcelabs/test-coverage-orb commands: report: description: | Report the test coverage file generated after running the tests to DeepSource. parameters: coverage-file: default: "" description: Path to the coverage data file. e.g. ./coverage.xml type: string dsn: default: ${DEEPSOURCE_DSN} description: | DeepSource DSN of this repository. It is available under Settings → Reporting tab of the repository page on DeepSource. type: string key: default: "" description: | Programming language shortcode for which coverage is reported. Supported languages are — go, javascript, python, ruby type: string steps: - run: command: | # Install DeepSource CLI curl https://deepsource.io/cli | sh # Set the DSN DEEPSOURCE_DSN=<< parameters.dsn >> # Report coverage artifact to the 'test-coverage' analyzer ./bin/deepsource report --analyzer test-coverage \ --key << parameters.key >> \ --value-file << parameters.coverage-file >> name: Report coverage file to DeepSource examples: report_python_coverage: description: Example usage of DeepSource test-coverage orb usage: version: "2.1" orbs: deepsource: deepsource/test-coverage jobs: run-test: docker: - image: cimg/python:3.8.5 steps: - checkout - run: pytest --cov --cov-report=xml - deepsource/report: coverage-file: ./coverage.xml dsn: ${DEEPSOURCE_DSN} key: python workflows: null
Developer Updates
Get tips to optimize your builds
Or join our research panel and give feedback
By submitting this form, you are agreeing to ourTerms of UseandPrivacy Policy.