Files
mtusi2026lab3/.github/workflows/app.yml
T
Alexey BodanyukandClaude Opus 5.5 55210c6e9c docs: DEFENSE и WINDOWS под lab3, модель данных, CI, сбор доказательств
- DEFENSE: что изменилось с lab2, путь POST с ключом, ответы на вопросы
  README, ловушки из чужих PR, периоды проверок и время обнаружения.
- WINDOWS: запуск на ноутбуке, make из PowerShell (нужен sh из Git),
  сценарий защиты по шагам README.
- DATA_MODEL: idempotency_keys и функция post_message.
- CI: test-failover с восстановлением, свои тесты.
- scripts/collect_evidence.py: все проверки на чистом clone -> evidence/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 16:03:23 +03:00

37 lines
1.5 KiB
YAML

name: Application (lab3)
on: [push, pull_request]
permissions:
contents: read
jobs:
app:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Synthetic secrets and env (CI only, never committed)
run: python scripts/init_secrets.py && cp .env.example .env
- name: Build, migrate once, start 2 API replicas behind HAProxy, wait for healthy
run: docker compose --env-file .env up -d --build --wait
- name: Contract and public smoke
run: make check test PYTHON=python
- name: Persistence across restart of LB, API replicas and stores
run: make test-persistence ACTION_SCRIPT=scripts/restart.sh PYTHON=python
- name: Failover of the replica that served the test, then restore it
run: |
make test-failover ACTION_SCRIPT=scripts/stop-one.sh PYTHON=python
sh scripts/restore-api.sh && python scripts/lbctl.py wait-up 2
- name: Own tests (unit + stand; every failure is restored in finally)
run: |
python -m pip install --require-hashes --no-deps -r requirements.txt
python -m pip install -r requirements-test.txt
make student-test PYTHON=python
- name: Logs
if: always()
run: docker compose logs --tail 100 api lb
- name: Remove CI stand and its synthetic data
if: always()
run: docker compose down -v