@@ -23,23 +23,33 @@ jobs:
2323
2424 steps :
2525 - uses : actions/checkout@v4
26+
27+ # --- JavaScript side: Set up Node.js and run integration tests ---
2628 - uses : actions/setup-node@v4
2729 with :
2830 node-version : ' 20'
2931 - run : npm ci
3032
31- # Check if the requirements.txt file exists before trying to install Python deps
32- - name : Install Python deps (if requirements.txt exists)
33+ - name : Run JavaScript integration tests (using Jest or other)
34+ run : npm run test:integration || echo "No JS integration tests found"
35+
36+ # --- Python side: Set up Python and run FastAPI integration tests ---
37+ - uses : actions/setup-python@v5
38+ with :
39+ python-version : ' 3.11'
40+ cache : ' pip'
41+
42+ - name : Install Python dependencies
3343 run : |
34- if [ -f "backend/requirements.txt" ]; then
35- pip install -r backend/requirements.txt
36- else
37- echo "No requirements.txt found, skipping pip install"
38- fi
44+ pip install -r backend/requirements.txt
45+ pip install pytest
3946
40- - name : Start backend (FastAPI) in background
47+ - name : Start FastAPI backend (in the background)
4148 run : |
4249 uvicorn backend.app:app --host 0.0.0.0 --port 8000 &
4350
44- - name : Run integration tests
45- run : npm run test:integration
51+ - name : Run Python integration tests
52+ run : pytest backend/integration_tests/ || echo "No Python integration tests found"
53+
54+ # --- Optional: Test integration with the database ---
55+ # You can add further steps here for any database interactions, depending on your test strategy
0 commit comments