-
-
Notifications
You must be signed in to change notification settings - Fork 9
229 lines (219 loc) · 7.98 KB
/
Copy pathtest.yml
File metadata and controls
229 lines (219 loc) · 7.98 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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
name: test
on:
pull_request:
paths:
- ".github/workflows/test.yml"
- "config/**"
- "experimental/**"
- "scripts/**"
- "packages/**"
- "tests/**"
- "package.json"
- "pnpm-lock.yaml"
- "pnpm-workspace.yaml"
concurrency:
group: test-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
- { name: go, run: "pnpm run test:go && pnpm --filter ttsc go:vet" }
# Minimal Windows safety net: the Go unit suites cover the
# platform-sensitive layers (config loaders, path handling) without
# the e2e runner, which is POSIX-only. Only the ttsx launcher build
# is needed (test-go-lint drives real ttsx), so the full
# build:current is skipped.
- {
name: windows-go,
os: windows-latest,
build: "pnpm --filter ttsc build",
run: "pnpm run test:go",
}
- {
name: shim-audit,
run: "pnpm --filter ttsc shim:audit:test && pnpm --filter ttsc shim:audit",
}
- {
name: typecheck,
run: "pnpm run check:flags && pnpm run test:typecheck",
}
- { name: banner, run: "pnpm --filter @ttsc/test-banner start" }
- { name: factory, run: "pnpm --filter @ttsc/test-factory start" }
- { name: paths, run: "pnpm --filter @ttsc/test-paths start" }
- { name: strip, run: "pnpm --filter @ttsc/test-strip start" }
# test-lint and test-ttsc build real Go plugin binaries; those
# go-binary scenarios dominate wall time and live under `src/native-plugins/`
# (the fast tests stay under `src/features/`). Each lane points
# `TTSC_TEST_DIR` at one subtree and trims its build to only the
# packages that subtree exercises (`TTSC_BUILD_SCOPE`), skipping the
# heavy @ttsc/graph build that neither suite needs.
- {
name: "ttsc fast",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: features,
scope: test-ttsc,
}
- {
name: "ttsc native corpus-source",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/corpus-source,
scope: test-ttsc,
}
- {
name: "ttsc native corpus-ttsc",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/corpus-ttsc,
scope: test-ttsc,
}
- {
name: "ttsc native corpus-misc",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/corpus-misc,
scope: test-ttsc,
}
- {
name: "ttsc native source-plugin",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/source-plugin,
scope: test-ttsc,
}
- {
name: "ttsc native service",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/service,
scope: test-ttsc,
}
- {
name: "ttsc native service-incremental",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/service-incremental,
scope: test-ttsc,
}
- {
name: "ttsc native server",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/server,
scope: test-ttsc,
}
- {
name: "ttsc native driver",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/driver,
scope: test-ttsc,
}
- {
name: "ttsc native cli",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/cli,
scope: test-ttsc,
}
- {
name: "ttsc native compiler",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/compiler,
scope: test-ttsc,
}
- {
name: "ttsc native utility",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/utility,
scope: test-ttsc,
}
- {
name: "ttsc native utility-host",
run: "pnpm --filter @ttsc/test-ttsc start",
dir: native-plugins/utility-host,
scope: test-ttsc,
}
- {
name: "lint fast",
run: "pnpm --filter @ttsc/test-lint start",
dir: features,
scope: test-lint,
}
- {
name: "lint native corpus",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/corpus,
scope: test-lint,
}
- {
name: "lint native corpus-2",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/corpus-2,
scope: test-lint,
}
- {
name: "lint native corpus-3",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/corpus-3,
scope: test-lint,
}
- {
name: "lint native corpus-4",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/corpus-4,
scope: test-lint,
}
- {
name: "lint native format",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/format,
scope: test-lint,
}
- {
name: "lint native config",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/config,
scope: test-lint,
}
- {
name: "lint native fix",
run: "pnpm --filter @ttsc/test-lint start",
dir: native-plugins/fix,
scope: test-lint,
}
- { name: unplugin, run: "pnpm --filter @ttsc/test-unplugin start" }
- { name: metro, run: "pnpm --filter @ttsc/test-metro start" }
- { name: graph, run: "pnpm --filter @ttsc/test-graph start" }
- {
name: graph-bench,
run: "node experimental/benchmark/graph/bench.mjs --runs=3",
}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 24.x
- uses: actions/setup-go@v5
with:
go-version-file: packages/ttsc/go.mod
cache-dependency-path: |
packages/ttsc/go.sum
packages/ttsc/tools/shim_audit/go.sum
tests/go-transformer/go.mod
- uses: pnpm/action-setup@v4
with:
version: 10.6.4
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Use System Go For Source Plugin Tests
shell: bash
run: echo "TTSC_GO_BINARY=$(go env GOROOT)/bin/go" >> "$GITHUB_ENV"
- name: Build Current Platform
run: ${{ matrix.build || 'pnpm run build:current' }}
env:
# Empty (full build) for ordinary lanes; the test lanes set a scope so
# build:current skips packages they never exercise (notably @ttsc/graph).
TTSC_BUILD_SCOPE: ${{ matrix.scope }}
- name: Run ${{ matrix.name }}
run: ${{ matrix.run }}
env:
# Empty for ordinary lanes → the runner scans the whole suite. A test
# lane points this at one subtree (`features` or `native-plugins/<category>`).
TTSC_TEST_DIR: ${{ matrix.dir }}