-
Notifications
You must be signed in to change notification settings - Fork 0
264 lines (216 loc) · 6.59 KB
/
ci.yml
File metadata and controls
264 lines (216 loc) · 6.59 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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
name: CI
on:
pull_request:
push:
branches:
- main
- master
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
compatibility:
name: Compatibility (Node ${{ matrix.node }})
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
node:
- '18'
- '20'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci
- name: Run test suite
run: npm test
release-surface:
name: Release Surface (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 20
needs:
- lint
- compatibility
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Check npm package payload
run: npm run pack:check
- name: Verify VS Code extension scaffold
run: |
node -e "const pkg=require('./packages/themis-vscode/package.json'); if (pkg.main !== './src/extension.js') throw new Error('Unexpected VS Code extension entrypoint'); if (!pkg.contributes?.views?.themis?.length) throw new Error('Missing Themis results view'); console.log('VS Code extension scaffold looks valid.');"
- name: Generate human HTML report and agent payload
run: |
NO_COLOR=1 node bin/themis.js test --reporter html
mkdir -p .themis/runs
NO_COLOR=1 node bin/themis.js test --agent > .themis/runs/agent-result.json
test -f __themis__/reports/report.html
test -f .themis/runs/agent-result.json
test -f .themis/runs/last-run.json
test -f .themis/diffs/run-diff.json
test -f .themis/diffs/contract-diff.json
- name: Upload showcase artifacts
uses: actions/upload-artifact@v4
with:
name: themis-showcase-node20
retention-days: 14
path: |
__themis__/reports/report.html
__themis__/reports/themis-bg.png
__themis__/reports/themis-report.png
.themis/runs/agent-result.json
.themis/runs/last-run.json
.themis/runs/failed-tests.json
.themis/diffs/run-diff.json
.themis/runs/run-history.json
packages/themis-vscode/package.json
packages/themis-vscode/README.md
- name: Benchmark proof
run: npm run benchmark
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: themis-benchmark-proof
retention-days: 14
path: |
.themis/benchmarks/benchmark-last.json
.themis/benchmarks/migration-proof.json
perf-gate:
name: Perf Gate (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 20
needs:
- lint
- compatibility
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Benchmark regression gate
env:
BENCH_MAX_AVG_MS: '2500'
run: npm run benchmark:gate
migration-proof:
name: Migration Proof (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 20
needs:
- lint
- compatibility
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Verify checked-in Jest/Vitest migration fixtures
run: npm run proof:migration
- name: Upload migration proof artifacts
uses: actions/upload-artifact@v4
with:
name: themis-migration-proof
retention-days: 14
path: |
.themis/migration/fixtures/**
themis-react-showcase:
name: Themis React Showcase (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 20
needs:
- lint
- compatibility
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Verify native Themis React fixture
run: node scripts/verify-showcase-fixture.js themis
- name: Upload Themis showcase summary
uses: actions/upload-artifact@v4
with:
name: themis-react-showcase
retention-days: 14
path: .themis/benchmarks/showcase-comparison/themis*
react-showcase-perf:
name: React Showcase Perf (Node 20)
runs-on: ubuntu-latest
timeout-minutes: 20
needs:
- lint
- compatibility
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Benchmark same-spec React showcase runners
run: npm run benchmark:showcase
- name: Publish runner benchmark summary
run: cat .themis/benchmarks/showcase-comparison/perf-summary.md >> "$GITHUB_STEP_SUMMARY"
- name: Upload React showcase perf artifact
uses: actions/upload-artifact@v4
with:
name: themis-react-showcase-perf
retention-days: 14
path: |
.themis/benchmarks/showcase-comparison/perf-summary.json
.themis/benchmarks/showcase-comparison/perf-summary.md
.themis/benchmarks/showcase-comparison/themis*
.themis/benchmarks/showcase-comparison/jest*
.themis/benchmarks/showcase-comparison/vitest*