Repository navigation
71 lines (66 loc) · 1.72 KB
/
Copy pathci.yml
File metadata and controls
71 lines (66 loc) · 1.72 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
name: CI
on:
push:
branches: [dev, main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
backend:
name: Backend (pytest)
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
services:
# Same image as compose.yaml; tests create their own cookable_test database
postgres:
image: pgvector/pgvector:0.8.7-pg18
env:
POSTGRES_USER: cookable
POSTGRES_PASSWORD: cookable
POSTGRES_DB: cookable
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U cookable"
--health-interval 5s
--health-timeout 3s
--health-retries 10
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v10.3.2
with:
python-version: "3.14"
enable-cache: true
- run: uv sync --locked
- run: uv run pytest -q
frontend:
name: Frontend (lint, typecheck, build)
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v5
- uses: pnpm/action-setup@v6
with:
# pnpm version comes from the "packageManager" field
package_json_file: frontend/package.json
- uses: actions/setup-node@v5
with:
node-version: 22
cache: pnpm
cache-dependency-path: frontend/pnpm-lock.yaml
- run: pnpm install --frozen-lockfile
- run: pnpm lint
- run: pnpm typecheck
- run: pnpm build
containers:
name: Container images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Build images
run: docker compose build