Добавить собственные интеграционные тесты и CI-проверку
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
name: Application
|
||||
on: [push, pull_request]
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
compose:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- run: python scripts/init_local.py
|
||||
- run: docker compose config --quiet
|
||||
- run: docker compose up -d --build --wait --wait-timeout 120
|
||||
- run: make check test test-idempotency
|
||||
- run: |
|
||||
docker compose cp student-tests api1:/app/student-tests
|
||||
docker compose exec -T api1 python -m unittest discover -s student-tests -v
|
||||
- run: chmod +x scripts/restart.sh scripts/stop-one.sh && make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
||||
- run: make test-failover ACTION_SCRIPT=scripts/stop-one.sh
|
||||
- run: docker compose start api1 api2
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: infrastructure-evidence
|
||||
path: |
|
||||
evidence/restart-*.txt
|
||||
evidence/stop-*.txt
|
||||
- if: always()
|
||||
run: docker compose down
|
||||
Reference in New Issue
Block a user