docs: Gitea — основной репозиторий и трекер, SourceCraft — зеркало (ADR-010)

Refs #22

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 19:49:04 +03:00
co-authored by Claude Opus 5.5
parent c79059f778
commit af1585c634
8 changed files with 117 additions and 11 deletions
+5 -2
View File
@@ -33,7 +33,7 @@
| Репозиторий | Что внутри | CI/CD |
|---|---|---|
| `tgit` | код бота | PR/push `dev`: lint + types + tests; push `main`: + деплой бота на хост |
| `tgit` (Gitea → зеркало в SourceCraft) | код бота | push в любую ветку: lint + types + tests; push `main`: + деплой бота на хост |
| `tgit-uploads` | `projects/<name>/…` от пользователей | push `main`: проверки проекта; успех → `ssh tgit-runner deploy <project> <sha>` |
## 2. Компоненты
@@ -142,9 +142,12 @@ docker run -d --name tgit-app-<project> --label tgit.project=<project> --label t
## 5. CI/CD
### 5.1 Репозиторий бота (`tgit/.sourcecraft/ci.yaml`)
Код живёт в Gitea, SourceCraft получает его push-зеркалом и запускает CI/CD (ADR-010).
| Триггер | Workflow | Шаги |
|---|---|---|
| PR в `dev`/`main`, push в `dev` | `check` | `uv sync --frozen` → `ruff check` + `ruff format --check` → `mypy app` → `pytest --cov=app --cov-fail-under=70` |
| push в любую ветку (через зеркало Gitea; PR живут в Gitea — ADR-010) | `check` | `uv sync --frozen` → `ruff check` + `ruff format --check` → `mypy app` → `pytest --cov=app --cov-fail-under=70` |
| push в `main` | `check` + `deploy` | → `infra/deploy/deploy.sh` по SSH (секреты `DEPLOY_SSH_KEY`, `DEPLOY_HOST`) → smoke: healthcheck контейнера |
### 5.2 Репозиторий загрузок (`tgit-uploads/.sourcecraft/ci.yaml`)