feat: lint and format tests in CI
ci / backend (push) Failing after 36s
ci / frontend (push) Successful in 3m26s

Only src/ was covered, which is why it stayed clean while tests/ drifted to 38
findings. migrations/ stays out: its alembic template emits unused imports, so
every generated revision would fail the gate.
This commit is contained in:
2026-08-17 20:56:24 -04:00
parent 5ec5a4d334
commit e9fe18266d
3 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -37,10 +37,10 @@ jobs:
run: uv sync --locked
- name: Format
run: uv run ruff format --check src/
run: uv run ruff format --check src/ tests/
- name: Lint
run: uv run ruff check src/
run: uv run ruff check src/ tests/
# pytest-databases starts a throwaway PostgreSQL container, so this needs a working
# Docker daemon on the runner — the same requirement the release workflow has.
+2 -2
View File
@@ -42,8 +42,8 @@ jobs:
working-directory: backend
run: |
uv sync --locked
uv run ruff format --check src/
uv run ruff check src/
uv run ruff format --check src/ tests/
uv run ruff check src/ tests/
uv run pytest tests/ -q
- uses: actions/setup-node@v4
+7 -5
View File
@@ -70,7 +70,7 @@ Backend (from `backend/`):
```bash
uv run litestar --app-dir src/chitai/ run --reload # dev server on :8000
pytest tests/ # needs Docker (pytest-databases)
ruff format src/
ruff format src/ tests/
alchemy --config chitai.database.config.config make-migrations
alchemy --config chitai.database.config.config upgrade
@@ -104,10 +104,12 @@ API docs are served by the running backend at `http://localhost:8000/schema/` (S
- **Migrations are mandatory.** The app runs with `create_all=False`, so a model change without a
matching Alembic revision will not reach the database.
- **CI gates formatting, linting, types and tests.** `.gitea/workflows/ci.yml` runs on every push
and pull request: `ruff format --check`, `ruff check`, `pytest`, `prettier --check` and
`pnpm check` all **block**; only `eslint` reports without failing, and only until the two
`{@html}` findings in `TODO.md` are fixed. A `v*` tag additionally builds and publishes both
container images — see `docs/ci-release-pipeline.md`.
and pull request: `ruff format --check src/ tests/`, `ruff check src/ tests/`, `pytest`,
`prettier --check` and `pnpm check` all **block**; only `eslint` reports without failing, and
only until the two `{@html}` findings in `TODO.md` are fixed. Ruff covers `src/` and `tests/`
but deliberately not `migrations/`, whose alembic template emits imports it does not use. A
`v*` tag additionally builds and publishes both container images — see
`docs/ci-release-pipeline.md`.
- **Commit messages** follow `type: summary``feat:`, `fix:`, `refactor:`, `chore:`.
- The three `README.md` files are user-facing. Agent-facing knowledge belongs in the `AGENTS.md`
files.