Update codecov/codecov-action action to v5 #3833
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/tests.yml | |
name: Tests | |
on: | |
push: | |
branches: | |
- '*' | |
- '!gh-pages' | |
# Run on all branches except gh-pages | |
pull_request: | |
branches: | |
- '*' | |
- '!gh-pages' | |
# Run on all branches except gh-pages | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: "Python $({ matrix.python-version }) tests" | |
runs-on: ubuntu-latest | |
env: | |
USING_COVERAGE: '3.10' | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@248ae51c2e8cc9622ecf50685c8bf7150c6e8813 # tag=v1.4 | |
with: | |
egress-policy: block | |
allowed-endpoints: > | |
auth.docker.io:443 | |
codecov.io:443 | |
files.pythonhosted.org:443 | |
github.com:443 | |
production.cloudflare.docker.com:443 | |
pypi.org:443 | |
pyup.io:443 | |
registry-1.docker.io:443 | |
storage.googleapis.com:443 | |
uploader.codecov.io:443 | |
productionresultssa8.blob.core.windows.net:443 | |
productionresultssa1.blob.core.windows.net:443 | |
pipelinesghubeus25.actions.githubusercontent.com:443 | |
docker.io:443 | |
actions-results-receiver-production.githubapp.com:443 | |
api.github.com:443 | |
productionresultssa4.blob.core.windows.net:443 | |
results-receiver.actions.githubusercontent.com:443 | |
cli.codecov.io:443 | |
- name: "Checkout" | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
with: | |
clean: true | |
- name: "Python setup" | |
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- run: pip install nox==2024.4.15 | |
- run: pip install poetry==1.8.3 | |
- run: pip install nox-poetry==1.0.2 | |
- run: nox -p ${{ matrix.python-version }} | |
- name: "Post to codecov.io" | |
if: "contains(env.USING_COVERAGE, matrix.python-version)" | |
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5 | |
with: | |
verbose: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false |