CI: auf Python 3.12 heben, damit gegen das getestet wird, was ausgeliefert wird
Der Testlauf lief in catthehacker/ubuntu:act-22.04 mit Python 3.10. Django 6.1 verlangt >= 3.12, ließ sich dort also gar nicht installieren — was erst durch das Pinnen aufgefallen ist: vorher stand "django>=4.2" in requirements.txt und pip hat in CI still ein 4.x aufgelöst, während das Image auf python:3.12-slim ein 6.1 bekam. Die Suite hat damit eine andere Django-Version getestet als die ausgelieferte. 24.04 bringt Python 3.12 mit und markiert sein System-Python als extern verwaltet (PEP 668), deshalb laufen die Schritte jetzt über ein venv. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
23798cda01
commit
58fad47d90
1 changed files with 13 additions and 4 deletions
|
|
@ -11,16 +11,25 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: catthehacker/ubuntu:act-22.04
|
# 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
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: pip install --no-cache-dir -r requirements.txt
|
# 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
|
||||||
|
|
||||||
- name: Django system check
|
- name: Django system check
|
||||||
run: python manage.py check
|
run: /tmp/venv/bin/python manage.py check
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: python manage.py test
|
run: /tmp/venv/bin/python manage.py test
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue