-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (56 loc) · 1.52 KB
/
ci.yml
File metadata and controls
59 lines (56 loc) · 1.52 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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
backend:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg16
env:
POSTGRES_DB: codeassist
POSTGRES_USER: codeassist
POSTGRES_PASSWORD: codeassist
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U codeassist -d codeassist"
--health-interval 5s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: postgresql://codeassist:codeassist@localhost:5432/codeassist
STORAGE_DIR: storage
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install backend dependencies
working-directory: backend
run: pip install -r requirements.txt
- name: Compile backend
run: python -m compileall backend/app
frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Lint frontend
working-directory: frontend
run: npm run lint
- name: Build frontend
working-directory: frontend
env:
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000
run: npm run build