-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (102 loc) · 3.24 KB
/
ci.yml
File metadata and controls
107 lines (102 loc) · 3.24 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
no-mock-evo2-check:
name: "Verify no MockEvo2 in codebase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check for MockEvo2 or mock_evo2
run: |
if grep -r "MockEvo2\|mock_evo2" --include="*.py" --include="*.ts" --include="*.tsx" .; then
echo "ERROR: MockEvo2 or mock_evo2 found in codebase. Remove all mock Evo 2 adapters."
exit 1
fi
echo "PASS: No mock Evo2 adapters found."
backend-tests:
name: Backend API tests
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_DB: test_cell_state_compiler
POSTGRES_USER: cellcompiler
POSTGRES_PASSWORD: cellcompiler
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 10
redis:
image: redis:7-alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install API deps
working-directory: apps/api
run: pip install -e ".[test]"
- name: Run Alembic migrations
working-directory: apps/api
env:
DATABASE_URL: postgresql+psycopg2://cellcompiler:cellcompiler@localhost:5432/test_cell_state_compiler
run: alembic upgrade head
- name: Run backend tests
working-directory: apps/api
env:
DATABASE_URL: postgresql+psycopg2://cellcompiler:cellcompiler@localhost:5432/test_cell_state_compiler
REDIS_URL: redis://localhost:6379/0
JWT_SECRET: test_secret_32_chars_minimum_here_xx
GENOME_MODEL_SERVICE_URL: http://localhost:8100
run: pytest app/tests/ -v --tb=short
genome-service-tests:
name: Genome model service tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install genome service deps
working-directory: apps/genome-model-service
run: pip install -e ".[test]"
- name: Run genome service tests
working-directory: apps/genome-model-service
env:
EVO2_PROVIDER: local
EVO2_MODEL_NAME: evo2_1b_base
EVO2_DEVICE: cpu
EVO2_HEALTH_RUN_SMOKE_TEST: "false"
ENABLE_EVO2_GENERATION: "false"
MAX_SEQUENCE_LENGTH: "8192"
SEQUENCE_SAFETY_MODE: restricted
run: pytest app/tests/ -v --tb=short
frontend-type-check:
name: Frontend TypeScript check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: apps/web/package-lock.json
- name: Install deps
working-directory: apps/web
run: npm ci
- name: Type check
working-directory: apps/web
run: npx tsc --noEmit
- name: Lint
working-directory: apps/web
run: npm run lint