Switch to v3 (#774)

This commit is contained in:
Tom Hu
2022-06-29 14:51:51 -04:00
committed by GitHub
parent 8e09eaf1b4
commit 2a829b95de

View File

@@ -11,20 +11,20 @@
**As of February 1, 2022, v1 has been fully sunset and no longer functions** **As of February 1, 2022, v1 has been fully sunset and no longer functions**
Due to the [deprecation](https://about.codecov.io/blog/introducing-codecovs-new-uploader/) of the underlying bash uploader, Due to the [deprecation](https://about.codecov.io/blog/introducing-codecovs-new-uploader/) of the underlying bash uploader,
the Codecov GitHub Action has released `v2` which will use the new [uploader](https://github.com/codecov/uploader). You can learn the Codecov GitHub Action has released `v2`/`v3` which will use the new [uploader](https://github.com/codecov/uploader). You can learn
more about our deprecation plan and the new uploader on our [blog](https://about.codecov.io/blog/introducing-codecovs-new-uploader/). more about our deprecation plan and the new uploader on our [blog](https://about.codecov.io/blog/introducing-codecovs-new-uploader/).
We will be restricting any updates to the `v1` Action to security updates and hotfixes. We will be restricting any updates to the `v1` Action to security updates and hotfixes.
### Migration from `v1` to `v2` ### Migration from `v1` to `v3`
The `v2` uploader has a few breaking changes for users The `v3` uploader has a few breaking changes for users
- Multiple fields have not been transferred from the bash uploader or have been deprecated. Notably - Multiple fields have not been transferred from the bash uploader or have been deprecated. Notably
many of the `functionalities` and `gcov_` arguments have been removed. Please check the documentation many of the `functionalities` and `gcov_` arguments have been removed. Please check the documentation
below for the full list. below for the full list.
## Usage ## Usage
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v2` is recommended) as a `step` within your `workflow.yml` file. To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v3` is recommended) as a `step` within your `workflow.yml` file.
If you have a *private repository*, this Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, store it as a `secret`). Optionally, you can choose to include up to four additional inputs to customize the upload context. **For public repositories, no token is needed** If you have a *private repository*, this Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, store it as a `secret`). Optionally, you can choose to include up to four additional inputs to customize the upload context. **For public repositories, no token is needed**
@@ -33,7 +33,7 @@ Inside your `.github/workflows/workflow.yml` file:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@master
- uses: codecov/codecov-action@v2 - uses: codecov/codecov-action@v3
with: with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ./coverage1.xml,./coverage2.xml # optional files: ./coverage1.xml,./coverage2.xml # optional
@@ -108,7 +108,7 @@ jobs:
pip install pytest-cov pip install pytest-cov
pytest --cov=./ --cov-report=xml pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov - name: Upload coverage to Codecov
uses: codecov/codecov-action@v2 uses: codecov/codecov-action@v3
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/ directory: ./coverage/reports/