Skip to content

Commit a5dc7da

Browse files
committed
Update codecov-action auth and flags
Updates codecov-action to use OIDC authentication, and adds the unit-tests flag to codecov reports.
1 parent bbec220 commit a5dc7da

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/tox-test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ jobs:
4141
run: tox -e static
4242
coverage:
4343
runs-on: ubuntu-latest
44+
permissions:
45+
id-token: write
4446
steps:
4547
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
4648
- name: Setup Python
@@ -57,9 +59,12 @@ jobs:
5759
- name: Install pytest cov
5860
run: pip install pytest-cov
5961
- name: Upload coverage to Codecov
60-
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
62+
uses: codecov/codecov-action@v6
63+
if: github.event_name == 'pull_request' || (github.event_name == 'push' && github.ref =='refs/heads/master')
6164
with:
62-
token: ${{ secrets.CODECOV_TOKEN }}
65+
use_oidc: true
66+
flags: unit-tests
67+
files: coverage.xml
6368
fail_ci_if_error: true
6469
verbose: true
6570
docs:

0 commit comments

Comments
 (0)