-
Notifications
You must be signed in to change notification settings - Fork 128
99 lines (74 loc) · 2.94 KB
/
Copy pathci.yml
File metadata and controls
99 lines (74 loc) · 2.94 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
# .github/workflows/ci.yml
name: CI
permissions:
contents: read
on:
pull_request:
types: [opened, synchronize, reopened]
# Prevents multiple runs on the same PR from overlapping
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality-gate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Required to see commit history and changed files
- name: Setup Bun
uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: "1.3.1"
# Bun install is fast enough that complex caching of node_modules often adds more overhead than it saves.
# We'll rely on Bun's speed. If needed, we can cache ~/.bun/install/cache.
- name: Install dependencies
run: bun install
- name: Check Formatting (warning only)
run: |
bun run format:check || echo "::warning::Formatting issues detected. Run 'bun run format' locally."
- name: Type Check
run: bun run typecheck
- name: Validate Generated SDK (lock integrity)
run: bun run validate:generated
- name: Script Tests (codegen + IR contract)
run: bun run test:scripts
- name: Skill/IR Consistency
run: bun run check:skills
- name: Run Tests (with coverage thresholds)
run: cd packages/sdk && bun run test:coverage
- name: Production Build
run: bun run build
- name: Smoke Test
run: bun run test:smoke
- name: Bundle Size (root entry budget)
run: bun run check:bundle
- name: Consumer Type Surface (public API compiles for a strict-TS consumer)
run: bun run check:consumer-types
- name: Examples Type-Check (repo examples compile against the built surface)
run: bun run check:examples
- name: Publish Readiness (pack + consumer install + subpath imports)
run: bun run publish:readiness
# The published target is Node (engines.node >=18, main: dist/...). The
# gate above runs everything under Bun; this lane re-runs the unit suite
# under Node so a Node-vs-Bun divergence cannot merge green unnoticed.
node-compat:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Bun
uses: oven-sh/setup-bun@f4d14e03ff726c06358e5557344e1da148b56cf7 # v1.2.2
with:
bun-version: "1.3.1"
- name: Setup Node
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: "20"
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
- name: Unit suite under Node (vitest runs on Node here, not Bun)
run: cd packages/sdk && npx vitest run