Merge pull request #44 from Lyncoln/login #92
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Full stack build | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'utk_curio/**' | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test-compose: | |
runs-on: ubuntu-latest | |
steps: | |
- name: 📥 Checkout repository | |
uses: actions/checkout@v3 | |
- name: 🔨 Build all service images in parallel | |
run: docker compose build --parallel | |
- name: ▶️ Start containers | |
run: docker compose up -d | |
- name: 🧪 Wait for services to become healthy | |
run: | | |
echo "Waiting for servers to be healthy..." | |
timeout 120 bash -c ' | |
until [ "$(docker inspect -f "{{.State.Health.Status}}" $(docker compose ps -q curio))" = "healthy" ]; do | |
echo "Still waiting..." | |
sleep 2 | |
done | |
' | |
- name: 🧪 Run backend unit tests | |
run: | | |
docker compose exec curio \ | |
python -m unittest discover -s utk_curio/backend/tests -t . -p "test_*.py" -v | |
- name: 🧪 Run sandbox unit tests | |
run: | | |
docker compose exec curio \ | |
python -m unittest discover -s utk_curio/sandbox/tests -t . -p "test_*.py" -v | |
- name: 🌐 Check frontend availability | |
run: | | |
curl --fail http://localhost:8080 || (echo "Frontend not reachable" && exit 1) | |
- name: 🧹 Tear down containers | |
run: docker compose down |