Собрать стенд из API, PostgreSQL и Valkey с хуком перезапуска

This commit is contained in:
2026-10-06 15:21:03 +03:00
parent f6acdf91e0
commit 7f599cb25e
10 changed files with 167 additions and 110 deletions
+7 -8
View File
@@ -8,7 +8,6 @@ defaults:
shell: bash
env:
BASE_URL: http://localhost:8080
CONTAINER: mtusi-messenger-lab2
jobs:
unit:
runs-on: ubuntu-latest
@@ -30,22 +29,22 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: docker build -t mtusi-messenger:lab2 .
- run: docker run -d --name "$CONTAINER" -p 127.0.0.1:8080:8080 --env-file .env.example mtusi-messenger:lab2
- run: sh student-tests/wait-ready.sh
- run: make secrets
- run: docker compose up -d --build --wait
- run: mkdir -p evidence-ci
- name: Public smoke
run: make test PYTHON=python BASE_URL="$BASE_URL" | tee evidence-ci/smoke.txt
- name: Persistence across a restart of the API and both stores
run: make test-persistence PYTHON=python BASE_URL="$BASE_URL" ACTION_SCRIPT=scripts/restart.sh | tee evidence-ci/persistence.txt
- name: Concurrency check
run: go run ./tools/concurrency --base-url "$BASE_URL" --output evidence-ci/concurrency.json
- name: SIGTERM and restart
run: sh student-tests/lifecycle.sh | tee evidence-ci/lifecycle.txt
- name: Container logs
if: always()
run: docker logs "$CONTAINER" > evidence-ci/container.log 2>&1 || true
run: docker compose logs > evidence-ci/compose.log 2>&1 || true
- name: Cleanup
# The CI stand is disposable, so its volumes go too.
if: always()
run: docker rm -f "$CONTAINER" || true
run: docker compose down -v || true
- uses: actions/upload-artifact@v4
if: always()
with: