2026-03-16 19:40:11 +01:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- master
|
|
|
|
|
- testing
|
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
test:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
container:
|
2026-08-28 08:56:37 +00:00
|
|
|
# 22.04 ships Python 3.10, which cannot install the pinned Django (it
|
|
|
|
|
# needs >= 3.12). While requirements.txt still said "django>=4.2" that
|
|
|
|
|
# went unnoticed and pip quietly resolved a 4.x here — so CI was testing
|
|
|
|
|
# a different Django than the image actually shipped. 24.04 gives us
|
|
|
|
|
# 3.12, matching the Dockerfile's python:3.12-slim.
|
|
|
|
|
image: catthehacker/ubuntu:act-24.04
|
2026-03-16 19:40:11 +01:00
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
2026-03-16 20:03:49 +01:00
|
|
|
- name: Install Python dependencies
|
2026-08-28 08:56:37 +00:00
|
|
|
# 24.04 marks its system Python as externally managed (PEP 668), so a
|
|
|
|
|
# bare `pip install` is refused. A venv is the sanctioned way in.
|
|
|
|
|
run: |
|
|
|
|
|
python -m venv /tmp/venv
|
|
|
|
|
/tmp/venv/bin/pip install --no-cache-dir -r requirements.txt
|
2026-03-16 19:40:11 +01:00
|
|
|
|
|
|
|
|
- name: Django system check
|
2026-08-28 08:56:37 +00:00
|
|
|
run: /tmp/venv/bin/python manage.py check
|
2026-03-16 19:40:11 +01:00
|
|
|
|
|
|
|
|
- name: Run tests
|
2026-08-28 08:56:37 +00:00
|
|
|
run: /tmp/venv/bin/python manage.py test
|