- e2e/reader.spec.js: ein Test-EPUB (e2e/make_epub.py) hochladen, öffnen ohne zu senden, lesen und Lesestand nach Neuladen, Fußnote, Markierung und Notizleiste, Hell/Dunkel samt Reader, alle Tabs ohne Seitenfehler. - e2e/env.js: E2E_PORT und E2E_PYTHON; nie einen laufenden Server wiederverwenden (dahinter läge eine echte Datenbank). - CI: eigener Job e2e (Playwright + Chromium); blockiert den Docker-Build nicht. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
2.1 KiB
YAML
68 lines
2.1 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- testing
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
# 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:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Python dependencies
|
|
# 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
|
|
# The SQLite file lives in data/ (a volume in production, git-ignored).
|
|
# Since the podcast models have JSON fields, the check opens the
|
|
# database to ask whether it supports them — so the folder must exist.
|
|
run: |
|
|
mkdir -p data
|
|
/tmp/venv/bin/python manage.py check
|
|
|
|
- name: Run tests
|
|
run: /tmp/venv/bin/python manage.py test
|
|
|
|
e2e:
|
|
# The browser tests (e2e/, docs/refactoring.md): a real runserver on its own
|
|
# throwaway database, a book uploaded, read, highlighted, the theme switched.
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: catthehacker/ubuntu:act-24.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
python -m venv /tmp/venv
|
|
/tmp/venv/bin/pip install --no-cache-dir -r requirements.txt
|
|
|
|
- name: Install Playwright and Chromium
|
|
run: |
|
|
npm ci
|
|
npx playwright install --with-deps chromium
|
|
|
|
- name: Browser tests
|
|
env:
|
|
CI: '1'
|
|
E2E_PYTHON: /tmp/venv/bin/python
|
|
run: |
|
|
mkdir -p data
|
|
npx playwright test
|