-
Notifications
You must be signed in to change notification settings - Fork 20
56 lines (56 loc) · 1.61 KB
/
test.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
test_backend:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
sudo apt-get install libgraphviz-dev
python -m pip install --upgrade pip
pip install uv==0.4.4
# Use the legacy lockfile to battle test it
uv pip sync --system requirements.txt
# Update output format to enable automatic inline annotations.
- name: Lint Python code
run: ruff check --output-format=github
- name: Check Python formatting
run: ruff format --check
# Check that the lockfile does not need to be updated
# If this fails, run `uv export --format requirements-txt > requirements.txt`.
- name: Check lockfile
run: |
uv lock --locked
uv export --format requirements-txt > requirements.txt.locked
diff requirements.txt requirements.txt.locked
test_frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
cd frontend
npm ci
- name: Build packages
run: |
cd frontend
npm run build
- name: Check lints and formatting
run: |
cd frontend
npm run check