Skip to content

Commit

Permalink
fix: add codecov token to github action (#375)
Browse files Browse the repository at this point in the history
* fix: add codecov token to github action

v4 of the codecov action requires the token to be specified as a parameter

* Update ci.yml

* Update ci.yml

* docs: add mention of token for codecov

Signed-off-by: Henry Schreiner <[email protected]>

---------

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: Henry Schreiner <[email protected]>
  • Loading branch information
JeanElsner and henryiii authored Feb 13, 2024
1 parent f833f3f commit dbf83f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/pages/guides/coverage.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,21 @@ uploading coverage reports easy for users. A minimal working example for
uploading coverage reports through your workflow, which should be more than
enough for a simple testing suite, can be written as follows:

{% raw %}

```yaml
- name: Upload coverage report
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
```

{% endraw %}

The lines above should be added after the step that runs your tests with the
`--cov` option. See the [docs](https://github.com/codecov/codecov-action#usage)
for all the optional options.
for all the optional options. You'll need to specify a `CODECOV_TOKEN` secret,
as well.

### Using codecov.yml

Expand Down
2 changes: 2 additions & 0 deletions {{cookiecutter.project_name}}/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,5 @@ jobs:
- name: Upload coverage report
uses: codecov/[email protected]
with:
token: {% raw %}${{ secrets.CODECOV_TOKEN }}{% endraw %}

0 comments on commit dbf83f6

Please sign in to comment.