Skip to content

Commit 5dd75fd

Browse files
Add more details in README
1 parent 36fe080 commit 5dd75fd

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

README.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,31 @@
22

33
[![DeepSource](https://static.deepsource.io/deepsource-badge-light-mini.svg)](https://deepsource.io/gh/deepsourcelabs/test-coverage-action/?ref=repository-badge)
44

5-
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.
630

731
## License
832

0 commit comments

Comments
 (0)