forked from mtusi2026/mtusi2026lab5
27 lines
818 B
YAML
27 lines
818 B
YAML
name: Application
|
|
on: [push, pull_request]
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
application:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
env:
|
|
BASE_URL: http://127.0.0.1:18091
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- run: |
|
|
python scripts/bootstrap.py
|
|
docker compose build api
|
|
docker compose up -d --wait
|
|
python scripts/wait_ready.py
|
|
make check test test-student BASE_URL=$BASE_URL
|
|
make test-failover ACTION_SCRIPT=scripts/stop-one.sh BASE_URL=$BASE_URL
|
|
docker compose up -d --wait --no-deps api
|
|
make test-persistence ACTION_SCRIPT=scripts/restart.sh BASE_URL=$BASE_URL
|
|
- if: always()
|
|
run: docker compose down
|