ci: update coverage.yml #4
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
name: Coverage analytics | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
analyze: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@main | |
- name: Setup Python | |
uses: actions/setup-python@main | |
with: | |
python-version: 3.13 | |
- name: Generate coverage report | |
run: | | |
pip install pytest | |
pip install pytest-cov | |
pip install . | |
pytest --cov --cov-report=xml --junitxml=junit.xml | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false | |
verbose: true | |
- name: Upload test results to Codecov | |
if: ${{ !cancelled() }} | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |