Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

README.md: Add step needed for DeepSource SaaS #139

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:

6. After the successful execution, `actions-rs@grcov`
will set an Action output called `report`
with an absolute path to the coverage report file.
with an absolute path to the coverage report file under `/tmp`.

This file can be uploaded to any code coverage service,
ex. with [codecov](https://github.com/marketplace/actions/codecov) or [coveralls](https://github.com/marketplace/actions/coveralls-github-action) Actions help:
Expand All @@ -99,6 +99,32 @@ jobs:
path-to-lcov: ${{ steps.coverage.outputs.report }}
```

If the upload action uses a docker image, ex. [deepsource](https://github.com/deepsourcelabs/test-coverage-action)
the report in `/tmp` wont be mapped into the action, so an extra
step is needed.


```yaml
- name: Move coverage file into workspace
run: mv ${{ steps.coverage.outputs.report }} ./coverage.xml

- name: Upload test coverage to DeepSource
uses: deepsourcelabs/test-coverage-action@master
with:
key: rust
coverage-file: coverage.xml
dsn: ${{ secrets.DEEPSOURCE_DSN }}
fail-ci-on-error: true
```

Note: DeepSource GitHub action depends on the checkout action, usually at the start
of the job, uses the `HEAD` sha instead of the default "merge" sha:
```yaml
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
```

## Inputs

* `config`: Configuration file path (relative to repository root, default to `.github/actions-rs/grcov.yml`)
Expand Down