-
Notifications
You must be signed in to change notification settings - Fork 2
131 lines (119 loc) · 4.54 KB
/
Copy pathmulti-runtime.yml
File metadata and controls
131 lines (119 loc) · 4.54 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: multi-runtime
# Verifies actor-ts boots and the core actor + cluster paths work
# identically across Bun, Node.js, and Deno. The smoke harness at
# tests/smoke/run-cases.mjs discovers cases under
# tests/smoke/cases/*.mjs and runs every one on each runtime —
# adding a new case is dropping a new file, no CI edits required.
# Job matrix keeps the runs parallel so the wall clock is bounded
# by the slowest runtime (Deno, ~30s including the build step).
# Bun runs twice: once on `latest` and once pinned to the `engines`
# floor (1.3.0), so the floor we claim is actually exercised.
#
# Bun additionally runs the full `bun test` suite — the unit /
# multi-node suite uses bun:test's APIs and isn't portable to
# Node/Deno. Those two runtimes are exercised only via the smoke
# script + the build output (`dist/`), which is the surface
# end-users would consume.
#
# Triggers identical to test.yml — any change that could plausibly
# affect a test outcome.
on:
push:
branches: [develop]
paths:
- 'src/**'
- 'tests/**'
- 'package.json'
- 'bun.lock'
- 'tsconfig.json'
- 'tsconfig.dev.json'
- '.github/workflows/multi-runtime.yml'
pull_request:
branches: [main, develop]
paths:
- 'src/**'
- 'tests/**'
- 'package.json'
- 'bun.lock'
- 'tsconfig.json'
- 'tsconfig.dev.json'
- '.github/workflows/multi-runtime.yml'
workflow_dispatch:
jobs:
smoke:
runs-on: ubuntu-latest
strategy:
# fail-fast: false so a Deno-only regression doesn't mask a
# Node-only one. Each runtime gets its own red mark.
fail-fast: false
matrix:
runtime: [bun, bun-floor, node, deno]
name: smoke (${{ matrix.runtime }})
steps:
- uses: actions/checkout@v7
# Every job needs Bun even for the Node/Deno runs because the
# build step (`bun run build`) emits `dist/` which Node/Deno
# consume. Bun's `setup-bun@v2` is fast (~3s cached) so the
# overhead is acceptable. `bun-floor` pins the `engines` floor
# instead of `latest`.
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ matrix.runtime == 'bun-floor' && '1.3.0' || 'latest' }}
# Install in a Bun-only environment (no Node on PATH), exactly like
# publish.yml: better-sqlite3's postinstall then resolves a prebuilt
# binary for Bun's ABI instead of falling back to a node-gyp source
# build. No smoke case touches better-sqlite3, so the Bun-ABI
# binary is inert for the Node/Deno runs.
- name: Install
run: bun install
# Node/Deno are set up AFTER the install (see above). Node stays on
# 24 deliberately — it is the `engines` floor we claim to support.
- name: Setup Node.js
if: matrix.runtime == 'node'
uses: actions/setup-node@v7
with:
node-version: '24'
- name: Setup Deno
if: matrix.runtime == 'deno'
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
# Bun + Deno can load TS directly. The Node job runs the compiled
# output in `dist/` — deliberately, since that is the surface
# end-users consume. Build only for runtimes that need it;
# saves ~20s on the Bun smoke jobs.
- name: Build (tsc → dist/)
if: ${{ !startsWith(matrix.runtime, 'bun') }}
run: bun run build
- name: Smoke (Bun)
if: startsWith(matrix.runtime, 'bun')
run: bun run smoke:bun
- name: Smoke (Node)
if: matrix.runtime == 'node'
run: bun run smoke:node
- name: Smoke (Deno)
if: matrix.runtime == 'deno'
run: bun run smoke:deno
# The full bun:test unit suite runs only under Bun (Bun.serve,
# better-sqlite3 native compile, fastify autoload — these are
# Bun-specific or Bun-tested-only). This job mirrors the
# `test.yml` Bun job but without the README-badge-update side
# effect — that stays in test.yml as the canonical updater.
unit-bun:
runs-on: ubuntu-latest
name: bun unit suite
steps:
- uses: actions/checkout@v7
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- run: bun run typecheck
# Worker-thread multi-node suites + LeaseMajority e2e are quarantined
# on hosted runners (Bun can't respawn functional workers there) —
# they run locally + in Docker; `integration` is the CI gate. See
# the [CI] tracking issue.
- run: bun test
env:
ACTOR_TS_SKIP_FLAKY_MNS: '1'