Skip to content

Maintenance related tasks (Django 6.1, Python 3.15) #94

Maintenance related tasks (Django 6.1, Python 3.15)

Maintenance related tasks (Django 6.1, Python 3.15) #94

Workflow file for this run

name: Test & Lint
on:
push:
branches:
- main
pull_request:
workflow_call: # Allow for the publish workflows to run the tests by calling this workflow
permissions:
contents: read # Mandatory for actions/checkout
concurrency:
group: "test-${{ github.ref }}"
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: 3.14
cache: "pip"
- name: Install dependencies
run: |
python -m pip install .[test]
- name: Run pre-commit hooks
uses: j178/prek-action@5337cb91e0fa35a7ff31b9ca345126d8bbbcdf16 # v2.0.6
test:
name: Python ${{ matrix.python}} ${{ matrix.toxenv }}
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
experimental: [false]
toxenv: ["py"]
include:
# Future Wagtail release from main branch (allowed to fail)
- python: "3.15"
toxenv: future
experimental: true
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
cache: "pip"
- name: Install dependencies
run: |
python -m pip install tox tox-py coverage
# This step runs only for jobs NOT in the include matrix
- name: Run tox targets for Python ${{ matrix.python }}
if: ${{ matrix.toxenv == 'py' }}
run: |
tox --py current
# This step runs only for jobs in the include matrix
- name: Run tox targets for Python ${{ matrix.python }} (${{ matrix.toxenv }})
if: ${{ matrix.toxenv != 'py' }}
env:
TOXENV: ${{ matrix.toxenv }}
run: |
tox
- name: Generate coverage report
run: |
coverage combine
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: unittests
fail_ci_if_error: true