Skip to content

Commit f762df9

Browse files
authored
Update integration-tests.yml
1 parent ebc04f5 commit f762df9

File tree

1 file changed

+11
-32
lines changed

1 file changed

+11
-32
lines changed
Lines changed: 11 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
name: Integration Tests
1+
name: CI – Integration Tests
22

33
on:
44
pull_request:
5-
workflow_run:
6-
workflows: [Unit Tests]
7-
types: [completed]
5+
branches: [ main ]
86

97
jobs:
108
integration:
@@ -14,7 +12,8 @@ jobs:
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

Comments
 (0)