-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (57 loc) · 2.39 KB
/
Copy pathci.yml
File metadata and controls
65 lines (57 loc) · 2.39 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runtime: [bun, node]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
# LOAD-BEARING for `Verify generated artifacts`, not just a test-runtime choice.
# That step rebuilds bin/ and dist/ and compares the result BYTE-FOR-BYTE against
# what is committed, so it passes only when this version equals the bun that built
# the committed bundles. Measured: at 19738de the committed bundles are bun 1.3.14
# output, and rebuilding them under bun 1.3.13 drifts by 4 lines in
# bin/knowledge-mcp.js and dist/index.js — bun 1.3.13 keeps the empty `else {}`
# blocks that 1.3.14's dead-code elimination collapses. Same shape both directions,
# so this is a bun minifier/DCE difference between patch releases, NOT zod codegen
# drift, and bun.lock cannot pin it (a lockfile pins dependencies, not the bun
# binary). Bumping or lowering this line without rebuilding bin/ and dist/ in the
# same commit turns the gate red. Keep both jobs on the same version.
bun-version: 1.3.14
- name: Setup Node
if: matrix.runtime == 'node'
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: latest
- name: Install dependencies
run: bun install
- name: Run tests
run: bun test
- name: Verify generated artifacts
run: bun run verify:generated
test-matrix:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runtime: [bun]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
# Must match the `test` job above — see the note there on why this version is
# load-bearing for the generated-artifact byte comparison.
bun-version: 1.3.14
- run: bun install
- run: bun test --timeout 20000