Repository navigation
83 lines (70 loc) · 2.2 KB
/
Copy pathci.yml
File metadata and controls
83 lines (70 loc) · 2.2 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
81
82
83
name: CI
on:
push:
pull_request:
jobs:
test:
name: tests (unit + sandbox + integration)
runs-on: ubuntu-latest
# Throwaway Postgres and Redis for the integration suite. CI never needs,
# and never gets, credentials for a real database.
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: quantummind
POSTGRES_PASSWORD: quantummind
POSTGRES_DB: quantummind
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U quantummind -d quantummind"
--health-interval 5s
--health-timeout 5s
--health-retries 10
redis:
image: redis:7
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql+psycopg://quantummind:quantummind@localhost:5432/quantummind
REDIS_URL: redis://localhost:6379/0
# A missing service or sandbox image fails the run instead of skipping tests.
REQUIRE_INTEGRATION: "1"
REQUIRE_SANDBOX: "1"
# GROQ_API_KEY is intentionally not set: the test conftest supplies a dummy
# and the suite mocks the LLM.
steps:
- uses: actions/checkout@v4
# Build the locked-down execution image so the containment tests can run it.
- name: Build the code-execution sandbox image
run: docker build -t quantummind-sandbox sandbox/
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install dependencies
working-directory: backend
run: uv sync --frozen
- name: Run the full test suite
working-directory: backend
run: uv run python -m pytest tests/ -q
frontend:
name: frontend build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install dependencies
working-directory: frontend
run: npm ci
- name: Build
working-directory: frontend
run: npm run build