-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (90 loc) · 2.54 KB
/
ci.yml
File metadata and controls
113 lines (90 loc) · 2.54 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
108
109
110
111
112
113
name: CI
on:
push:
branches: [main, rag]
pull_request:
branches: [main, rag]
jobs:
backend:
name: Backend (Python)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: bitcoin_academy
POSTGRES_PASSWORD: bitcoin_academy
POSTGRES_DB: bitcoin_academy
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 5s
--health-timeout 5s
--health-retries 5
defaults:
run:
working-directory: services/ai
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
cache-dependency-path: services/ai/pyproject.toml
- name: Install dependencies
run: pip install -e ".[dev]"
- name: Type check (mypy)
run: mypy app
env:
DATABASE_URL: postgresql://bitcoin_academy:bitcoin_academy@localhost:5432/bitcoin_academy
SECRET_KEY: CI-AUTH-JWT-KEY-FOR-PIPELINE-ONLY-32!
- name: Run tests (pytest)
run: pytest
env:
DATABASE_URL: postgresql://bitcoin_academy:bitcoin_academy@localhost:5432/bitcoin_academy
SECRET_KEY: CI-AUTH-JWT-KEY-FOR-PIPELINE-ONLY-32!
ENVIRONMENT: development
frontend:
name: Frontend (Node.js)
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/web
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: apps/web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Type check (tsc)
run: npm run type-check
- name: Lint
run: npm run lint
env:
NEXT_PUBLIC_API_BASE_URL: http://localhost:8000/api
- name: Run tests (Jest)
run: npm test -- --ci --passWithNoTests
qvac-service:
name: QVAC Service (Node.js)
runs-on: ubuntu-latest
defaults:
run:
working-directory: workers/qvac-service
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: npm
cache-dependency-path: workers/qvac-service/package-lock.json
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test