Files

32 lines
1.5 KiB
YAML

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