forked from mtusi2026/mtusi2026lab2
ЛР 2: PostgreSQL, сессии, Valkey и исследование восстановления
This commit is contained in:
@@ -12,5 +12,27 @@ jobs:
|
||||
python-version: '3.12'
|
||||
- run: python -m pip install -r requirements-dev.txt
|
||||
- run: make check validate PYTHON=python
|
||||
# This job validates the skeleton, not a student solution.
|
||||
# Add build, readiness and make test in a separate application job.
|
||||
application:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Prepare disposable local configuration
|
||||
run: |
|
||||
python - <<'PY'
|
||||
from pathlib import Path
|
||||
import secrets
|
||||
config = Path('.env.example').read_text()
|
||||
Path('.env').write_text(config.replace('change-me-before-running', secrets.token_urlsafe(24)))
|
||||
Path('.env').chmod(0o600)
|
||||
PY
|
||||
- name: Build and wait for readiness
|
||||
run: docker compose --env-file .env up -d --build --wait --wait-timeout 180
|
||||
- name: Public API scenario
|
||||
run: make test BASE_URL=http://127.0.0.1:8080 PYTHON=python
|
||||
- name: Stop disposable runner stack
|
||||
if: always()
|
||||
run: docker compose --env-file .env down -v
|
||||
|
||||
Reference in New Issue
Block a user