Merge pull request #141 from adtzlr/update-codecov-workflow #2
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: Codecov | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
run: | |
name: Upload coverage report to codecov.io | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v3 | |
- name: Test with tox | |
run: | | |
pip install tox | |
tox -- --cov matadi --cov-report xml --cov-report term | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
if: ${{ matrix.python-version == '3.12' }} | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |