Add tox, move to pyproject.toml, bump Python/Django/Wagtail support #89
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: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| workflow_call: # Allow for the publish workflow to run the tests by calling this workflow | |
| jobs: | |
| test-sqlite: | |
| name: Python ${{ matrix.python }} (sqlite) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install tox coverage | |
| - name: Run tox targets for Python ${{ matrix.python }} | |
| run: | | |
| tox run -f py$(echo ${{ matrix.python }} | tr -d .) | |
| coverage combine | |
| coverage report | |
| coverage xml | |
| test-postgres: | |
| name: Python ${{ matrix.python }} (postgres) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - python: "3.10" | |
| toxenv: "py310-dj52-wt70" | |
| - python: "3.14" | |
| toxenv: "py314-dj60-wt74" | |
| services: | |
| postgres: | |
| image: postgres:14 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| ports: | |
| - 5432:5432 | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| env: | |
| DATABASE_ENGINE: django.db.backends.postgresql | |
| DATABASE_HOST: localhost | |
| DATABASE_USER: postgres | |
| DATABASE_PASS: postgres | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Python ${{ matrix.python }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install tox psycopg | |
| - name: Run tox env ${{ matrix.toxenv }} | |
| run: tox -e ${{ matrix.toxenv }} |