feat(infra): шаблон репозитория загрузок tgit-uploads — CI/CD, служебные скрипты, демо-сервис

- .sourcecraft/ci.yaml: push в main → check (compile · ruff мягкий · bandit · pytest по сервисам) → deploy
- .tgit/changed_services.py: изменённые services/<name>/ (без родителя — все сервисы)
- .tgit/run_tests.py: pytest каждого сервиса со своими requirements.txt
- deploy пока заглушка со списком сервисов — tgit-runner в #13
- services/hello: демо-сервис с тестом; tgit.yaml — формат настроек сервиса

Refs #7

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-13 23:59:41 +03:00
co-authored by Claude Opus 5.5
parent bbd4ac5bc1
commit d4dba9748d
10 changed files with 200 additions and 2 deletions
@@ -0,0 +1,22 @@
"""Demo service: logs a heartbeat line every 10 seconds."""
import logging
import time
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
def greeting(n: int) -> str:
return f"hello #{n}"
def main() -> None:
n = 0
while True:
n += 1
logging.info(greeting(n))
time.sleep(10)
if __name__ == "__main__":
main()
@@ -0,0 +1,5 @@
from main import greeting
def test_greeting() -> None:
assert greeting(3) == "hello #3"
@@ -0,0 +1,3 @@
# Настройки сервиса для tgit-runner (#13). Все поля необязательны.
# health_url: http://localhost:8080/health # HTTP-проба «Статуса»; без неё health = контейнер жив
# network: false # доступ в интернет; включает только администратор