77 branches : [ main, master ]
88
99jobs :
10+ # Run tests in parallel for speed - each job gets its own isolated container
1011 frontend-tests :
1112 runs-on : ubuntu-latest
13+ timeout-minutes : 10
1214 steps :
1315 - uses : actions/checkout@v4
1416 - name : Set up Node.js
@@ -24,40 +26,55 @@ jobs:
2426
2527 backend-tests :
2628 runs-on : ubuntu-latest
29+ timeout-minutes : 10
2730 steps :
2831 - uses : actions/checkout@v4
2932 - name : Install uv
3033 uses : astral-sh/setup-uv@v5
3134 with :
3235 enable-cache : true
33- cache-dependency-path : server/uv.lock
36+ cache-dependency-glob : server/uv.lock
3437 - name : Set up Python
3538 run : uv python install
3639 - name : Install dependencies
3740 run : cd server && uv sync
3841 - name : Run backend tests
3942 run : |
4043 cd server
41- PYTHONPATH=. uv run pytest
44+ PYTHONPATH=. uv run pytest --timeout=300
45+ # Safety cleanup - runs even if tests fail
46+ - name : Cleanup processes
47+ if : always()
48+ run : |
49+ pkill -f "pytest" || true
50+ pkill -f "uvicorn" || true
4251
4352 integration-tests :
4453 runs-on : ubuntu-latest
54+ timeout-minutes : 10
4555 steps :
4656 - uses : actions/checkout@v4
4757 - name : Install uv
4858 uses : astral-sh/setup-uv@v5
4959 with :
5060 enable-cache : true
51- cache-dependency-path : server/uv.lock
61+ cache-dependency-glob : server/uv.lock
5262 - name : Set up Python
5363 run : uv python install
5464 - name : Install dependencies
5565 run : cd server && uv sync
5666 - name : Run integration tests
5767 run : |
5868 cd server
59- PYTHONPATH=. uv run pytest tests_integration
69+ PYTHONPATH=. uv run pytest tests_integration --timeout=300
70+ # Safety cleanup - runs even if tests fail
71+ - name : Cleanup processes
72+ if : always()
73+ run : |
74+ pkill -f "pytest" || true
75+ pkill -f "uvicorn" || true
6076
77+ # Deploy only runs after ALL tests pass (sequential dependency)
6178 deploy :
6279 needs : [frontend-tests, backend-tests, integration-tests]
6380 if : github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
0 commit comments