Skip to content

Commit 5a18f60

Browse files
Merge pull request #4 from Neang-Rothmny/testCode
Test code
2 parents f4839be + 749ea4f commit 5a18f60

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,33 @@ on:
55
branches: [main]
66

77
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.9'
19+
20+
- name: Install backend dependencies
21+
run: |
22+
cd backend
23+
pip install -r requirements.txt
24+
pip install -r requirements-dev.txt
25+
26+
- name: Run backend tests
27+
run: |
28+
cd backend
29+
pytest -v tests/
30+
831
deploy:
932
runs-on: ubuntu-latest
1033
environment: deploy
34+
needs: test # Only deploy if tests pass
1135

1236
steps:
1337
- name: Checkout repository

0 commit comments

Comments
 (0)