Skip to content

Commit 8583024

Browse files
committed
ci: workflow to run tests on pr
1 parent 31c5744 commit 8583024

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/run-tests.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Run Tests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
frontend-tests:
9+
name: Run Frontend Tests
10+
runs-on: ubuntu-latest
11+
12+
defaults:
13+
run:
14+
working-directory: ./frontend
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install frontend dependencies
26+
run: npm ci
27+
28+
- name: Run tests
29+
run: npm run test:ci
30+
31+
backend-tests:
32+
name: Run Backend Tests
33+
runs-on: ubuntu-latest
34+
35+
defaults:
36+
run:
37+
working-directory: ./backend
38+
39+
steps:
40+
- name: Checkout code
41+
uses: actions/checkout@v4
42+
43+
- name: Set up Python
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: 3.11
47+
48+
- name: Install backend dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
pip install -r requirements.txt
52+
53+
- name: Run pytest
54+
run: pytest

0 commit comments

Comments
 (0)