Add a Forgejo Actions CI pipeline #13
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The repo has no CI configuration — no
.forgejo/workflows/, no.github/workflows/.Tests landing in this milestone are only worth what enforcement makes them worth, so
CI should land alongside them rather than after.
Scope
A Forgejo Actions pipeline running lint, type checks, tests, and build on every push
and pull request.
Implementation notes
.forgejo/workflows/ci.yml.pip install -e ".[dev]", run Ruff (or the agreed linter),run
alembic upgrade headagainst a scratch DB to prove migrations apply cleanly fromzero, then
pytest.npm ci,tsc --noEmit,npm run lint,npm test,npm run build.before the suite has settled mostly produces noise.
forgejo-ci-logsMCP rather thanguessing at the cause.
Done when
References
backend/pyproject.toml,frontend/package.jsonAmended by the audit of 2026-07-28.
Add to this pipeline:
pip-auditandnpm auditgating the build (#72). Neither project has a committed lockfiletoday, so this must come after lockfiles are added — otherwise there is nothing stable to audit.
frontend/src/typesfrom the OpenAPI schema andfail the build on a diff. This is what structurally prevents bugs like #83, where the dashboard
reads a field the API never returns.
Done in
8a28bbband379d64a..forgejo/workflows/ci.ymlruns on every push tomainand every pull request, two jobs inparallel:
ruff check,alembic upgrade headthendowngrade baseagainst an empty database, thenpytestnpm ci,tsc --noEmit,npm run buildNotes on two decisions worth knowing about:
The backend job runs on
node:22-bookworm-slim, not a Python image. The first run failed atcheckout with
exec: node: executable file not found in $PATH—actions/checkoutis a JavaScriptaction and needs node inside the job container. The frontend job passed because
node:22-slimhasit. Debian bookworm ships Python 3.11, which satisfies
requires-python, and its Python isexternally managed (PEP 668) so dependencies install into a venv. There is a comment in the workflow
explaining this so nobody "simplifies" it back to
python:3.11-slim.pytest currently exits 5 (no tests collected) and the workflow tolerates that with a warning
rather than failing, since #5 has not landed. The workflow carries a comment to remove that handling
once the suite exists — left in place it would mask a suite that has stopped being discovered.
Migration verification is stronger than this issue asked for: it applies the chain from empty and
rolls it back, so a downgrade path that has silently rotted is caught too.
Remaining, tracked elsewhere:
pip-audit/npm auditsteps → #72The whole pipeline was verified locally in the same container image before pushing: ruff exits 0,
migrations apply and roll back, pytest exits 5.