Skip to content

Commit 24f061e

Browse files
authored
Create unit-tests.yml
1 parent 919fbdf commit 24f061e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/unit-tests.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Unit Tests
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ['**']
7+
8+
jobs:
9+
test-js-py:
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node: [18, 20]
15+
python: ['3.10', '3.11']
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
# --- JavaScript side ---
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node }}
24+
cache: 'npm'
25+
- run: npm ci
26+
- run: npm test -- --ci || echo "No JS tests"
27+
28+
# --- Python side ---
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python }}
32+
cache: 'pip'
33+
- run: |
34+
pip install -r backend/requirements.txt
35+
pip install pytest
36+
pytest backend || echo "No Py tests"

0 commit comments

Comments
 (0)