Repository navigation
127 lines (91 loc) · 3.63 KB
/
Copy pathci.yml
File metadata and controls
127 lines (91 loc) · 3.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
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
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm typecheck
- run: pnpm lint
- name: Check formatting (prettier)
run: pnpm format:check
- run: pnpm test
- run: pnpm build
- name: Smoke-test built entrypoints load in raw Node
run: pnpm smoke
# The floor is TypeScript 5.4 (`NoInfer`), pinned in test/ts-floor. Two
# checks because there are two published artifacts: JSR ships `src/**/*.ts`
# and npm ships `dist/*.d.ts`, so neither check covers the other.
- name: Typecheck source at the minimum supported TypeScript (JSR consumers)
run: pnpm typecheck:min
- name: Typecheck a consumer against the published types (npm consumers)
run: pnpm typecheck:consumer
- name: Check type exports (attw)
run: pnpm check-exports
- name: Verify JSR packaging
run: pnpm dlx jsr@0.14.3 publish --dry-run --allow-dirty
# The vitest suite above runs on Node only. Each job below serves a real
# `pipeline` from the built dist on one of the other runtimes the package
# targets and asserts runtime detection, env resolution, and that the host's
# platform argument never reaches `ctx`. Fixtures live in test/runtimes/.
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- uses: denoland/setup-deno@22d081ff2d3a40755e97629de92e3bcbfa7cf2ed # v2.0.5
with:
deno-version: v2.x
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Serve the built dist on Deno
run: pnpm test:deno
bun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: latest
- run: pnpm install --frozen-lockfile
- run: pnpm build
- name: Serve the built dist on Bun
run: pnpm test:bun
workers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: pnpm/action-setup@8912a9102ac27614460f54aedde9e1e7f9aec20d # v6.0.5
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
- run: pnpm install --frozen-lockfile
- run: pnpm build
# workerd runs locally through @cloudflare/vitest-pool-workers; the
# fixture pins its own vitest because the pool requires a newer major.
- name: Serve the built dist inside workerd
run: pnpm test:workers