-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (32 loc) · 1011 Bytes
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Run tests
on:
push
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install pip and poetry
run: pip install --upgrade pip poetry
- uses: actions/cache@v4
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('src/poetry.lock') }}
- name: Install Poetry dependencies
run: cd src && poetry install
- uses: actions/cache@v4
with:
path: src/frontend/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('src/frontend/package-lock.json') }}
- name: Install Node dependencies
run: cd src/frontend && npm install
- name: Build frontend
run: cd src/frontend && npm run build
- name: Run tests
run: cd src && poetry run pytest -v