Перенесите реализацию lab3 и сохраните серии нагрузочных экспериментов
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
name: Application
|
||||
on: [push, pull_request]
|
||||
permissions:
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
# Explicit bash turns on `-eo pipefail`, so a failing check behind `| tee` fails the job.
|
||||
shell: bash
|
||||
env:
|
||||
BASE_URL: http://localhost:8080
|
||||
jobs:
|
||||
unit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.27.1'
|
||||
- run: go vet ./...
|
||||
- run: go test -race -count=1 ./...
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
needs: unit
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.27.1'
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- 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: Failover of one replica behind the balancer
|
||||
run: |
|
||||
make test-failover PYTHON=python BASE_URL="$BASE_URL" ACTION_SCRIPT=scripts/stop-one.sh | tee evidence-ci/failover.txt
|
||||
docker compose start api
|
||||
docker compose up -d --wait
|
||||
- name: Concurrency and shared idempotency across replicas
|
||||
run: go run ./tools/concurrency --base-url "$BASE_URL" --output evidence-ci/concurrency.json
|
||||
- name: Container logs
|
||||
if: always()
|
||||
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 compose down -v || true
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: evidence
|
||||
path: evidence-ci
|
||||
Reference in New Issue
Block a user