-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (59 loc) · 1.7 KB
/
ci.yml
File metadata and controls
69 lines (59 loc) · 1.7 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
jobs:
build:
name: typecheck + build (turbo)
runs-on: ubuntu-22.04
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_PASSWORD: ci
POSTGRES_DB: sentrix_ci
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres"
--health-interval 5s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v6
with:
version: 9.12.0
run_install: false
- name: Setup Node 22
uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'pnpm'
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Turbo typecheck
run: pnpm turbo typecheck --concurrency=4
- name: Turbo build
run: pnpm turbo build --concurrency=4
- name: drizzle-kit generate (no diff = migrations in sync)
env:
DATABASE_URL: postgres://postgres:ci@localhost:5432/sentrix_ci
run: |
if [ -f packages/db/drizzle.config.ts ]; then
cd packages/db && pnpm exec drizzle-kit check 2>&1 || echo "::warning::drizzle-kit check failed (non-blocking)"
fi
docker:
name: docker images build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
- name: Build api image
run: docker build -f apps/api/Dockerfile -t indexer-api:ci .
- name: Build indexer image
run: docker build -f apps/indexer/Dockerfile -t indexer-worker:ci .