-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (64 loc) · 2.13 KB
/
Copy pathci.yml
File metadata and controls
80 lines (64 loc) · 2.13 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Verify uv.lock is in sync with pyproject.toml
# Fails fast when pyproject.toml has been edited without
# running ``uv lock`` to regenerate the lockfile. The
# production Dockerfile uses ``uv sync --frozen`` which
# installs strictly from uv.lock, so a drift between
# pyproject.toml (new dep added) and uv.lock (still old)
# silently ships a broken image. We caught this exact
# pattern when the Wave 2 PR added python-multipart to
# pyproject.toml but the lockfile wasn't regenerated — CI
# tests passed but the prod container crash-looped on
# ``import backend.routers.workspace`` because FastAPI's
# multipart-form decorator path raised at module load.
# ``uv lock --check`` exits non-zero if the lockfile would
# change, blocking the PR before merge.
run: uv lock --check
- name: Sync dependencies
run: uv sync --group dev --frozen
- name: Compile check
run: uv run python -m compileall backend src tests
- name: Run tests
run: uv run pytest -v
frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Node
uses: actions/setup-node@v5
with:
node-version: "24"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Lint
working-directory: frontend
run: npm run lint
- name: Test
working-directory: frontend
run: npm test
- name: Build
working-directory: frontend
run: npm run build