Merge pull request #184 from gpauloski/pre-commit-ci-update-config #394
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: | |
| branches: [main, test-me-*] | |
| tags: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| tests: | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| python: '3.9' | |
| toxenv: py39 | |
| - os: ubuntu-latest | |
| python: '3.10' | |
| toxenv: py310 | |
| - os: ubuntu-latest | |
| python: '3.11' | |
| toxenv: py311 | |
| - os: ubuntu-latest | |
| python: '3.12' | |
| toxenv: py312 | |
| - os: ubuntu-latest | |
| python: '3.13' | |
| toxenv: py313 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Set up Python ${{matrix.python}} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Get pip cache dir | |
| id: pip-cache-dir | |
| run: echo "PIP_CACHE_DIR=$(pip cache dir)" >> $GITHUB_ENV | |
| - name: Use pip cache | |
| id: pip-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.PIP_CACHE_DIR }} | |
| key: tests-${{ matrix.os }}-pip-${{ matrix.python }}-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| tests-${{ matrix.os }}-pip-${{ matrix.python }}- | |
| - name: Install Packages | |
| run: python -mpip install --upgrade pip tox | |
| - name: Run Tox | |
| run: tox -e ${{ matrix.toxenv }} |