Dernier reliquat de l'A35 (docs/périmètre dérivés) : - Dockerfile : python:3.12-slim → python:3.13-slim (builder + runtime) - .gitea/workflows/ci.yml : python-version '3.12' → '3.13' (lint + test) - README.md : « Python 3.12 » et « python:3.12-slim » → 3.13 (×2) - pyproject.toml : ruff target-version py312 → py313 (0 nouvelle remarque ruff) - zéro référence 3.12 résiduelle ; uv.lock (requires-python >=3.13) et le venv (3.13.14) étaient déjà bons Validation (le point laissé « à faire par un rebuild d'image ») : - docker build VERT sur python:3.13-slim → image flowdeck:a35-py313 - dans le conteneur : python -V = 3.13.16, `import app.main` OK (v7.35.0) → wheels requirements.txt construits + importables sur 3.13 A35 = TERMINÉ (OpenAPI/README/titre dupliqué faits en 7.3.9 + drift). suite **1093/1093** · ruff OK (target py313) · docs à jour
65 lines
2.2 KiB
YAML
65 lines
2.2 KiB
YAML
name: FlowDeck CI
|
|
|
|
on:
|
|
# Run on every pushed branch so feature branches are validated before the PR.
|
|
push:
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install lint tools
|
|
run: pip install -r requirements-dev.txt
|
|
- name: Ruff (Python)
|
|
run: ruff check app tests
|
|
- name: ESLint (JavaScript)
|
|
run: npx --yes eslint static/js
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
# NOTE: no `container:` here. A `python:*-slim` image ships no Node.js, so the
|
|
# JavaScript `actions/checkout` action could not run and every job failed at
|
|
# the first step. The runner's default image already provides Node; we install
|
|
# the Python toolchain explicitly with actions/setup-python.
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
- name: Install system dependencies (WeasyPrint / emoji fonts)
|
|
run: |-
|
|
SUDO=""
|
|
if command -v sudo >/dev/null 2>&1; then SUDO="sudo"; fi
|
|
$SUDO apt-get update
|
|
$SUDO apt-get install -y --no-install-recommends \
|
|
libpango-1.0-0 libpangoft2-1.0-0 libharfbuzz0b libffi-dev \
|
|
libjpeg-dev libopenjp2-7 libcairo2 fonts-noto-color-emoji
|
|
- name: Install Python dependencies
|
|
run: pip install -r requirements-dev.txt pytest-cov
|
|
- name: Run tests (parallel) with coverage
|
|
env:
|
|
GITEA_URL: https://git.dracodev.net
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
APP_SECRET_KEY: ci-test-key
|
|
# `-n auto` needs pytest-xdist, provided by requirements-dev.txt.
|
|
run: python -m pytest tests/ -v --tb=short -n auto --cov=app --cov-report=term
|
|
- name: Coverage summary
|
|
if: always()
|
|
run: coverage report -m || true
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build Docker image
|
|
run: docker build -t flowdeck .
|
|
- name: Verify image
|
|
run: docker run --rm flowdeck python -c "from app.main import app; print('OK')"
|