Files
app/.gitea/workflows/test-backend.yml
T
stroblmeandClaude Opus 5 d4a9406c51
Docs / docs (push) Successful in 49s
Playwright Tests / test-playwright (1, 2) (push) Failing after 1m11s
Playwright Tests / test-playwright (2, 2) (push) Failing after 23s
pre-commit / pre-commit (push) Successful in 3m2s
Test Backend / test-backend (push) Successful in 2m22s
Compose Smoke Test / test-compose (push) Failing after 22s
Playwright Tests / merge-reports (push) Canceled after 1s
Fix the CI gates: Python 3.13, concurrency groups, hook violations
The gates have never gone green on the new runners. Three separate reasons:

- backend/Dockerfile shipped Python 3.10 while the code imports typing.Self
  and datetime.UTC, so the container exited on import and the suite could not
  even load its conftest. The image moves to 3.13 and the packages declare
  >=3.12, which is the floor the tests actually pass on; ruff's target follows
  and rewrites timezone.utc and asyncio.TimeoutError accordingly. Relocking
  drops the 3.10 branch, which bumps FastAPI and so regenerates the SDK.
- frontend/README.md had no trailing newline and two dashboard widgets used
  arbitrary text-[…] sizes. Both are em-relative on purpose, so they move to
  the inline style the neighbouring ramp already uses.
- Every commit left its own run queued: without a concurrency group a runner
  that was offline for a while works through a backlog nobody reads. A stack
  that fails to come up now prints its logs before the teardown removes it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-24 14:55:59 +02:00

62 lines
2.3 KiB
YAML

name: Test Backend
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
# A new push supersedes the run still queued for the commit before it. Without
# this each commit leaves its own run in the queue and a runner that was offline
# for a while works through a backlog of results nobody will read.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# The compose files live in docker/, so a bare `docker compose` from the repo
# root finds nothing. With COMPOSE_FILE set, compose reads .env from the
# working directory — the same file the backend settings load as ../.env.
# compose.ci.yml drops the fixed container_names and the fixed 5432 — both
# daemon-global, so without it a second run on the same host cannot start.
COMPOSE_FILE: docker/compose.yml:docker/compose.dev.yml:docker/compose.ci.yml
jobs:
test-backend:
runs-on: ubuntu-latest
env:
# Per run, so the `down -v` steps reach neither a dev stack nor a run
# still going. Unique names cannot be recycled, hence the always-on
# teardown below.
COMPOSE_PROJECT_NAME: fluksio-app-ci-backend-${{ github.run_id }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
pyproject.toml
backend/pyproject.toml
uv.lock
- run: uv sync
# Nothing to start: the suite names its own SQLite file in a temp
# directory (backend/tests/__init__.py), the mail paths are patched, and
# the flow engine falls back to in-memory state without a Redis host.
- name: Run tests with coverage
run: uv run bash scripts/test.sh "Coverage for ${{ github.sha }}"
working-directory: backend
- name: Check the wheels build
# Cheap, and it catches a data file that stopped being packaged —
# alembic's revisions and the email templates ride along by directory.
run: |
uv build --all-packages --out-dir dist
uv run --no-project --with dist/fluksio_worker-*.whl fluksio-worker --help