forked from mtusi2026/mtusi2026lab3
выполнение лабы на 5
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
name: Application checks
|
||||
on: [push, pull_request]
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
compose-tests:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- run: python -m pip install -r requirements-dev.txt
|
||||
- name: Create local test credentials
|
||||
run: |
|
||||
cp .env.example .env
|
||||
./scripts/bootstrap-secrets.sh
|
||||
- name: Validate and start the application
|
||||
run: |
|
||||
make check validate PYTHON=python
|
||||
docker compose --env-file .env config --quiet
|
||||
docker compose --env-file .env up -d --build --scale api=2 --wait --wait-timeout 180
|
||||
- name: Run API and concurrency tests
|
||||
run: |
|
||||
make test
|
||||
make test-idempotency
|
||||
- name: Verify persistence and failover
|
||||
run: |
|
||||
make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
||||
- name: Stop test stack
|
||||
if: always()
|
||||
run: docker compose --env-file .env down -v
|
||||
@@ -0,0 +1,16 @@
|
||||
name: Skeleton contracts
|
||||
on: [push, pull_request]
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
contracts:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
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.
|
||||
Reference in New Issue
Block a user