test-coverage
Analyzer. Please make sure to read the general configuration guide first.
.deepsource.toml
.deepsource.toml
configuration file. This can be done by adding the following entry:
DEEPSOURCE_DSN
environment variableDEEPSOURCE_DSN
in your CI’s environment.
bin
directory in the command’s current working directory($PWD
/$0
). deepsource
executable will be present inside bin
. We would use this executable for our CLI to DeepSource from now.
<key>
is the language for which you’d be sending the coverage report.
report
command from the root of your repo. This will make sure that the filepaths in the test reports are handled to take care directories from your CI if they are present.Failing to do that might result in issues not getting raised for your project. You’d still be able to see the metrics.JaCoCo
and Clover
coverage formats report metrics for individual methods and may not contain data about the individual covered lines in the methods.For such cases, DeepSource uses a max
operation on the reported metrics to calculate the aggregate report. So if parts of certain methods are covered in different coverage reports, the reported line coverage for that method may be lower than the actual line coverage.For example, if one report covers the top 25% lines for a method, and another report covers the bottom 25% lines for the same method, since there is no way of knowing if both the lines in the reports are different, DeepSource will report the coverage to be 25% even though it might be 50%. This is only a limitation for JaCoCo
and Clover
coverage formats at the moment.--env/-e
flag.
test-coverage
Analyzer in your repository’s .deepsource.toml
file.DEEPSOURCE_DSN
variable as part of any publicly visible configuration file. It contains sensitive information.report
command used in the examples.
DEEPSOURCE_DSN
environment variable with the DSN copied above as its value.
.travis.yml
:
DEEPSOURCE_DSN
environment variable with the DSN copied above as its value.
.circleci/config.yml
:
DEEPSOURCE_DSN
in the “Name” input box..github/workflows/main.yml
:
ref
input in the actions/checkout
step:--use-oidc
flag to the deepsource report
command while sending the coverage report:DEEPSOURCE_DSN
.gitlab-ci.yml
:
DEEPSOURCE_DSN
DEEPSOURCE_DSN