You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GitHub Action that enables you to upload your test coverage data to DeepSource easily.
5
+
GitHub Action that enables you to upload your test coverage data to DeepSource easily. You must have the [Test Coverage](https://deepsource.io/docs/analyzer/test-coverage.html) analyzer enabled on your repository for reporting to work. Please refer to the [.deepsource.toml configuration reference](https://deepsource.io/docs/config/deepsource-toml.html#analyzers) for details.
6
+
7
+
If you're not using DeepSource yet, [get started for free](https://deepsource.io/signup).
8
+
9
+
10
+
## Usage
11
+
12
+
This Action assumes that the coverage file has already been generated after the tests have run. To integrate it in your workflow, define a step which refers to this Action in your `workflow.yml` file. We recommend that you use `@master`as the ref.
13
+
14
+
```yaml
15
+
steps:
16
+
- name: Report test coverage to DeepSource
17
+
uses: deepsourcelabs/test-coverage-action@master
18
+
with:
19
+
key: python
20
+
coverage-file: coverage.xml
21
+
dsn: ${{ secrets.DEEPSOURCE_DSN }}
22
+
```
23
+
24
+
The possible inputs to this action are:
25
+
26
+
* `key` (string, **required**): Programming language shortcode for which coverage is reported. Allowed values are: `python`, `go`.
27
+
* `coverage-file` (string, **required**): Path to the coverage data file. e. g. `coverage.xml`
28
+
* `dsn` (string, **required**): DeepSource DSN of this repository. It is available under **Settings → Reporting tab** of the repository page on DeepSource.
29
+
* `fail-ci-on-error` (boolean): Should the CI build fail if there is an error while uploading the report to DeepSource? Allowed values are: `true`, `false`. This is set to `false` by default.
0 commit comments