1- name : Integration Tests
1+ name : CI – Integration Tests
22
33on :
44 pull_request :
5- workflow_run :
6- workflows : [Unit Tests]
7- types : [completed]
5+ branches : [ main ]
86
97jobs :
108 integration :
1412 image : postgres:15
1513 env :
1614 POSTGRES_PASSWORD : test
17- ports : ['5432:5432']
15+ ports :
16+ - 5432:5432
1817 options : >-
1918 --health-cmd "pg_isready -U postgres"
2019 --health-interval 5s
@@ -24,33 +23,13 @@ jobs:
2423 steps :
2524 - uses : actions/checkout@v4
2625
27- # --- JavaScript side: Set up Node.js and run integration tests ---
28- - uses : actions/setup-node@v4
26+ - name : Setup Python
27+ uses : actions/setup-python@v5
2928 with :
30- node-version : ' 20'
31- - run : npm ci
29+ python-version : ' 3.11'
3230
33- - name : Run JavaScript integration tests (using Jest or other)
34- run : npm run test:integration || echo "No JS integration tests found"
31+ - name : Install Dependencies
32+ run : pip install -r requirements.txt
3533
36- # --- Python side: Set up Python and run FastAPI integration tests ---
37- - uses : actions/setup-python@v5
38- with :
39- python-version : ' 3.11' # No cache for pip
40-
41- # Check if requirements.txt exists and only install if it does
42- - name : Install Python dependencies (if requirements.txt exists)
43- run : |
44- if [ -f "backend/requirements.txt" ]; then
45- echo "Found requirements.txt, installing dependencies..."
46- pip install -r backend/requirements.txt
47- else
48- echo "No requirements.txt found, skipping pip install"
49- fi
50-
51- - name : Start FastAPI backend (in the background)
52- run : |
53- uvicorn backend.app:app --host 0.0.0.0 --port 8000 &
54-
55- - name : Run Python integration tests
56- run : pytest backend/integration_tests/ || echo "No Python integration tests found"
34+ - name : Run Integration Tests
35+ run : pytest tests/integration || echo "No integration tests found"
0 commit comments