-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.63 KB
/
ci.yml
File metadata and controls
52 lines (50 loc) · 1.63 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
name: ci
on:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: pgvector/pgvector:pg17
env:
POSTGRES_DB: kodiai
POSTGRES_USER: kodiai
POSTGRES_PASSWORD: kodiai
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U kodiai -d kodiai"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgresql://kodiai:kodiai@localhost:5432/kodiai
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.8
- run: bun install --frozen-lockfile
- run: bun run lint
- run: bun run verify:m056:s03
- run: bun run verify:m059:s01
- run: bun run verify:m059:s02
- run: bun run check:orphaned-tests
# Bun has been unstable on GitHub runners with one monolithic test process.
# Keep DB-backed tests on a low concurrency cap and split the suite into
# two shorter invocations to avoid cross-file schema interference and runner crashes.
# The first run covers scripts plus non-knowledge src tests; src/knowledge stays isolated.
- run: |
mapfile -t non_knowledge_tests < <(
{
find src -maxdepth 1 -type f -name '*.test.ts'
find src -maxdepth 1 -mindepth 1 -type d ! -name knowledge
} | sort
)
bun test --max-concurrency=2 scripts "${non_knowledge_tests[@]}"
- run: bun test --max-concurrency=2 src/knowledge
- run: bunx tsc --noEmit