Tests #104
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| - "*.rst" | |
| pull_request: | |
| paths-ignore: | |
| - "docs/**" | |
| - "*.md" | |
| - "*.rst" | |
| jobs: | |
| tests: | |
| name: ${{ matrix.name }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { name: Linux, python: "3.11", os: ubuntu-latest, tox: py311 } | |
| - { name: Windows, python: "3.11", os: windows-latest, tox: py311 } | |
| - { name: Mac, python: "3.11", os: macos-latest, tox: py311 } | |
| - { name: "3.10", python: "3.10", os: ubuntu-latest, tox: py310 } | |
| - { name: "3.9", python: "3.9", os: ubuntu-latest, tox: py39 } | |
| - { name: "3.8", python: "3.8", os: ubuntu-latest, tox: py38 } | |
| - { name: "PyPy3", python: "pypy-3.9", os: ubuntu-latest, tox: pypy3 } | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - run: uvx --with tox-uv tox -e ${{ matrix.tox }} | |
| - name: Generate coverage XML | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| uv pip install --system coverage[toml] | |
| cd .tox && coverage combine --rcfile ../pyproject.toml && coverage xml --rcfile ../pyproject.toml -o coverage-${{ matrix.tox }}.xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| fail_ci_if_error: true | |
| files: .tox/coverage-${{ matrix.tox }}.xml | |
| token: ${{ secrets.CODECOV_TOKEN }} |