Files
app/.gitea/workflows/test-compose.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

78 lines
3.0 KiB
YAML

name: Compose Smoke Test
# Lives in this repository rather than the workspace root: the stack it starts
# is entirely app-local (docker/compose*.yml + .env.example). A root workflow
# would additionally need a token to check out the private submodules and would
# have to run scripts/setup.sh to generate secrets, for the same coverage.
on:
push:
branches:
- main
paths:
- backend/**
- frontend/**
- docker/compose*.yml
- .env.example
- .gitea/workflows/test-compose.yml
pull_request:
types:
- opened
- synchronize
paths:
- backend/**
- frontend/**
- docker/compose*.yml
- .env.example
- .gitea/workflows/test-compose.yml
# 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:
# compose.ci.yml drops the fixed container_names and host ports so this job
# can share a runner host with the Playwright shards.
COMPOSE_FILE: docker/compose.yml:docker/compose.dev.yml:docker/compose.ci.yml
# Own project name so this job's `down -v` cannot reach another stack.
COMPOSE_PROJECT_NAME: fluksio-app-ci-compose
jobs:
test-compose:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Write .env
run: cp .env.example .env
# The Playwright job runs the SPA off a Vite server inside its own
# container, so the nginx image is only ever built there. This job is what
# covers it — the SPA fallback in frontend/nginx.conf is the part that
# breaks silently.
- run: docker compose build backend frontend
- run: docker compose down -v --remove-orphans
# Redis comes along as a depends_on; --wait blocks on the backend
# healthcheck in docker/compose.yml, which is also what proves the
# schema was created before anything served a request.
- run: docker compose up -d --wait backend frontend
# Nothing is published on the host (compose.ci.yml), so the checks run
# from inside the backend container against the project network.
- name: Backend is up
run: docker compose exec -T backend curl -f http://localhost:8000/api/v1/utils/health-check/
- name: Frontend is up
run: docker compose exec -T backend curl -f http://frontend/
- name: An authenticated route serves the SPA shell
run: docker compose exec -T backend curl -f http://frontend/flows
- name: Container logs
# `up --wait` reports only that a container exited, never why. Without
# this the whole failure is one line and the reason dies with the stack
# the teardown below removes.
if: failure()
run: docker compose logs --no-color --tail 200
- name: Tear down
if: always()
run: docker compose down -v --remove-orphans