-
-
Notifications
You must be signed in to change notification settings - Fork 13
56 lines (54 loc) · 1.76 KB
/
Copy pathci.yml
File metadata and controls
56 lines (54 loc) · 1.76 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
name: Build and Test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Set up Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version-file: ".bun-version"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Cache Vitest
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6
with:
path: node_modules/.vite
key: vitest-${{ runner.os }}-${{ hashFiles('bun.lock') }}
restore-keys: |
vitest-${{ runner.os }}-
- name: Setup Biome
uses: biomejs/setup-biome@4c91541eaada48f67d7dbd7833600ce162b68f51 # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Biome
run: biome ci .
- name: TypeScript Check - Server
run: tsc --noEmit
- name: TypeScript Check - Client
run: tsc --noEmit -p src/client/tsconfig.json
- name: TypeScript Check - Scripts
run: tsc --noEmit -p scripts/tsconfig.json
- name: OpenAPI Contract Drift Check
run: |
bun run openapi:dev
git diff --exit-code docs/static/openapi.json src/client/types/api.d.ts || {
echo "OpenAPI spec or generated client types are stale. Run 'bun run openapi:dev' and commit the results."
exit 1
}
- name: Run Tests
run: bun run test
- name: Build
run: bun run build