Merge pull request #1 from nm-packages/add-ci-testing #3
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| name: tox | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Install uv | |
| run: pip install uv | |
| - name: Install tox and plugins | |
| run: pip install tox tox-uv tox-gh-actions | |
| - name: Run tox | |
| env: | |
| PYTHONWARNINGS: default | |
| run: tox | |
| - name: Show coverage (if generated) | |
| if: always() | |
| run: | | |
| if [ -f .coverage ]; then | |
| pip install coverage && coverage report || true | |
| fi |