ci(forgejo): pytest gate for backend suite (CI-rehab 3/3) #1032

Merged
bot-backend merged 1 commit from ci/forgejo-pytest-gate into main 2026-06-06 15:04:19 +00:00
Collaborator

CI-rehab 3/3: реальный Forgejo pytest-гейт. Forgejo гоняет только .forgejo/workflows/*.github/ci.yml никогда не исполнялся, backend мержился/деплоился без тестов (так #994 district-500 ушёл незамеченным). Этот workflow: ruff check + полный backend pytest (1687 passed) на PR→main и push feature-веток, scoped backend/+data/sql/ через paths-filter. Mock-only (без postgres-сервиса): единственный real-DB тест self-skip через connectivity-пробу; WeasyPrint PDF-тесты БЕГУТ (libpango ставится). uv official installer (не setup-uv, PEP668), uv sync --frozen, TESTING=1 (test-mode RBAC bypass). Локально: 1687 passed / 0 failed.

⚠️ Требует human-действий (не bot-auto-merge — workflow-файл, self-extending guard git-pr.md):

  1. Смержить этот PR вручную.
  2. Forgejo Settings → Branch protection main → добавить backend-tests в required checks (иначе гейт виден, но не блокирует).
  3. (Опц.) auto-merge бот должен сверять статус check перед merge.

Refs #944.

**CI-rehab 3/3: реальный Forgejo pytest-гейт.** Forgejo гоняет только `.forgejo/workflows/*` → `.github/ci.yml` никогда не исполнялся, backend мержился/деплоился без тестов (так #994 district-500 ушёл незамеченным). Этот workflow: `ruff check` + полный backend pytest (1687 passed) на PR→main и push feature-веток, scoped backend/**+data/sql/** через paths-filter. Mock-only (без postgres-сервиса): единственный real-DB тест self-skip через connectivity-пробу; WeasyPrint PDF-тесты БЕГУТ (libpango ставится). uv official installer (не setup-uv, PEP668), `uv sync --frozen`, `TESTING=1` (test-mode RBAC bypass). Локально: 1687 passed / 0 failed. ⚠️ **Требует human-действий (не bot-auto-merge — workflow-файл, self-extending guard git-pr.md):** 1. Смержить этот PR вручную. 2. Forgejo Settings → Branch protection main → добавить `backend-tests` в required checks (иначе гейт виден, но не блокирует). 3. (Опц.) auto-merge бот должен сверять статус check перед merge. Refs #944.
bot-backend added 1 commit 2026-06-03 14:11:46 +00:00
ci(forgejo): add pytest gate for the main backend suite (CI-rehab 3/3)
All checks were successful
CI / changes (pull_request) Successful in 6s
CI / changes (push) Successful in 7s
CI / backend-tests (pull_request) Successful in 2m26s
CI / backend-tests (push) Successful in 2m26s
2793dd8c6c
Forgejo runs only .forgejo/workflows/* — the .github pytest gate never
executed here, so backend changes merged + deployed untested (live bug
#994 district 500 shipped uncaught). Add a real gate: ruff check + the full
backend pytest suite (1687 passed) on PRs to main and feature-branch pushes,
scoped to backend/** + data/sql/** via paths-filter. Mock-only lane (no
postgres service): the one real-DB test self-skips via a connectivity probe;
WeasyPrint PDF tests RUN thanks to installed libpango. uv via official
installer (not setup-uv, PEP 668), uv sync --frozen against the committed lock,
TESTING=1 to activate the test-mode RBAC bypass.

NOTE: making this a HARD required check + having the auto-merge bot consult
check status needs Forgejo branch-protection config (human action) — until
then the gate is visible but advisory.

Refs #944.
bot-backend merged commit 37837e72f4 into main 2026-06-06 15:04:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lekss361/gendesign#1032
No description provided.