Skip to content

Commit 363e909

Browse files
committed
- fix error mongodb in run tests
1 parent 1988519 commit 363e909

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/deploy.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,20 @@ jobs:
2929
with:
3030
python-version: '3.9'
3131

32-
- name: Install dependencies
33-
working-directory: ./backend
32+
- name: Create and activate virtual environment
3433
run: |
34+
python -m venv venv
35+
source venv/bin/activate
3536
python -m pip install --upgrade pip
36-
pip install -r requirements.txt
37-
37+
pip install -r backend/requirements.txt
38+
3839
- name: Run Tests
3940
working-directory: ./backend
40-
run: pytest --disable-warnings
41+
env:
42+
MONGO_URI: "mongodb://localhost:27017/test_db"
43+
run: |
44+
source ../venv/bin/activate
45+
pytest --disable-warnings
4146
4247
build-frontend:
4348
name: Build Frontend

0 commit comments

Comments
 (0)