Skip to content

CI: Use different python and django versions #23

CI: Use different python and django versions

CI: Use different python and django versions #23

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
pre_commit_checks:
name: Pre-commit checks
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@main
- uses: actions/setup-python@v5
with:
python-version-file: '.python-version'
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Setup uv python environment
run: uv venv
- name: uv lock check
run: uv lock --locked --offline
- name: uv sync
run: uv sync --all-groups --all-extras
- uses: pre-commit/action@main
test:
name: Test (py${{ matrix.python-version }} / dj${{ matrix.django-version }})
runs-on: ubuntu-latest
needs: pre_commit_checks
permissions:
contents: read
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.8"
django-version: "3.2"
- python-version: "3.11"
django-version: "4.2"
- python-version: "3.12"
django-version: "5.2"
- python-version: "3.13"
django-version: "6.0"
steps:
- uses: actions/checkout@main
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- name: Install dependencies
run: uv sync --all-groups --all-extras
- name: Run tests
run: |
uv run \
--with "django~=${{ matrix.django-version }}" \
pytest tests/ -v --tb=short