ЛР 2 — БВТ-2302 — Сабитов — на 3

This commit is contained in:
2026-12-01 00:50:23 +03:00
parent 65003b6119
commit ff7296c240
17 changed files with 987 additions and 34 deletions
+38
View File
@@ -0,0 +1,38 @@
name: Lab 2 application
on: [push, pull_request]
permissions:
contents: read
jobs:
postgres:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build and start
run: |
python - <<'PY'
from pathlib import Path
import secrets
settings = Path(".env.example").read_text()
Path(".env").write_text(settings.replace("POSTGRES_PASSWORD=", "POSTGRES_PASSWORD=" + secrets.token_hex(24)))
PY
docker compose --env-file .env up -d --build --wait --wait-timeout 60
- name: Verify API and persistence
run: |
make test PYTHON=python
python tests/student_tests.py
python tests/contract_edge_tests.py
chmod +x scripts/restart.sh
make test-persistence PYTHON=python ACTION_SCRIPT=scripts/restart.sh
- name: Stop lab services
if: always()
run: |
if [ -f .env ]; then
docker compose --env-file .env down
fi