forked from mtusi2026/mtusi2026lab2
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
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
|
|
application:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.12'
|
|
- run: cp .env.example .env
|
|
- run: docker compose --env-file .env up -d --build
|
|
- name: Wait until API is ready
|
|
run: |
|
|
for i in $(seq 1 60); do
|
|
if curl -fsS http://127.0.0.1:8080/health/ready; then exit 0; fi
|
|
sleep 2
|
|
done
|
|
docker compose --env-file .env logs
|
|
exit 1
|
|
- run: make test PYTHON=python
|
|
- run: chmod +x scripts/restart.sh
|
|
- run: make test-persistence ACTION_SCRIPT=scripts/restart.sh PYTHON=python
|
|
- run: python student-tests/run.py
|
|
- run: python student-tests/infra.py
|
|
- run: python scripts/run_expiry.py
|
|
- run: docker compose --env-file .env exec -T api python -m app.tools.explain
|