Skip to content

fix: Support Django 5.2 LTS #373

fix: Support Django 5.2 LTS

fix: Support Django 5.2 LTS #373

name: Example Project Tests
on:
push:
branches: [development]
pull_request:
branches: [development]
paths:
- .github/**
- src/**
- tests/**
- example_extension_project/**
- example_replacement_project/**
env:
PYTHONDONTWRITEBYTECODE: 1
PYTHONWARNINGS: once
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022]
python-version: ["3.12", "3.14"]
django-version: ["4.2", "5.2"]
project: ["extension", "replacement"]
exclude:
# Django 4.2 only supports Python up to 3.12
- python-version: "3.14"
django-version: "4.2"
# Test Django 5.2 with latest Python only
- python-version: "3.12"
django-version: "5.2"
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python3 -m pip install -U distlib pip setuptools wheel
- name: Get pip cache dir
id: pip-cache
shell: bash
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v5
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ runner.os }}-pip-${{ matrix.django-version }}-${{
hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python3 -m pip install -r ./requirements.txt
python3 -m flit install --deps none
python3 -m pip install -r ./example_${{ matrix.project }}_project/requirements.txt
- name: Install Django
run: python3 -m pip install "Django~=${{ matrix.django-version }}"
- name: Python and Django versions
run: |
echo "Python ${{ matrix.python-version }} & Django ${{ matrix.django-version }}"
python3 --version
echo "Django: $(django-admin --version)"
- name: Run tests
working-directory: ./example_${{ matrix.project }}_project
run: python3 manage.py test