Skip to content

Commit 972b167

Browse files
committed
install dependencies to run the tests via pytest command
1 parent 6e03171 commit 972b167

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,19 @@ jobs:
5050
docker buildx build --platform linux/amd64 -t $BACKEND_IMAGE_NAME:latest .
5151
docker run -d -p 8000:8000 --name thf-climate-backend $BACKEND_IMAGE_NAME
5252
- name: Wait for the application to start
53+
working-directory: ./backend
5354
run: |
5455
timeout 30 bash -c 'until curl -s http://127.0.0.1:8000/; do sleep 1; done'
5556
5657
# Step 7: Run the tests against the local application
57-
- name: Run tests
58+
- name: Install dependencies and Run tests (backend)
59+
working-directory: ./backend
5860
env:
5961
API_BASE_URL: "http://127.0.0.1:8000"
60-
run: pytest
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install -r requirements-dev.txt
65+
pytest
6166
6267
# Step 8: Push and Deploy the backend on Google cloud
6368
- name: Push Docker image to Artifact Registry (backend)

0 commit comments

Comments
 (0)