ЛР2: PostgreSQL, сессии, Redis-кэш, трек 5.2

This commit is contained in:
2026-10-26 21:20:34 +03:00
parent 65003b6119
commit cf4a7ad142
56 changed files with 4209 additions and 14 deletions
+31
View File
@@ -0,0 +1,31 @@
name: Application stack
# Отдельный job решения: сборка образа API, запуск Compose-стенда, публичный smoke,
# тест сохранности с restart hook и собственные проверки студента. Секреты генерируются
# на лету (синтетические), в репозитории их нет.
on: [push, pull_request]
permissions:
contents: read
jobs:
stack:
runs-on: ubuntu-24.04
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- name: Secrets and env (synthetic)
run: ./scripts/init-secrets.sh
- name: Compose config
run: docker compose --env-file .env config --quiet
- name: Build and start (api, api-ttl, postgres, redis)
run: docker compose --env-file .env --profile ttl up -d --build --wait
- name: Public smoke
run: make test
- name: Persistence (restart API + PostgreSQL + Redis, volumes kept)
run: make test-persistence ACTION_SCRIPT=scripts/restart.sh && cat evidence/restart-hook.txt
- name: Student tests (API/auth/validation/race/rollback, expiry, dependency failures)
run: make test-student
- name: Logs on failure
if: failure()
run: docker compose --env-file .env --profile ttl logs --no-color --tail=200
- name: Stop (volumes are discarded with the runner)
if: always()
run: docker compose --env-file .env --profile ttl --profile research down -v