-
Notifications
You must be signed in to change notification settings - Fork 0
204 lines (198 loc) · 7.05 KB
/
Copy pathe2e-matrix.yml
File metadata and controls
204 lines (198 loc) · 7.05 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
name: E2E Coverage Matrix
on:
push:
branches: [main]
paths:
- "cppmega_v4/**"
- "cppmega_mlx/**"
- "vbgui/**"
- "tests/fixtures/build_e2e_matrix.py"
- "tests/fixtures/tokenizers/**"
- "tests/fixtures/parquet/**"
- ".github/workflows/e2e-matrix.yml"
pull_request:
branches: [main]
paths:
- "cppmega_v4/**"
- "vbgui/**"
- "tests/fixtures/build_e2e_matrix.py"
schedule:
# Nightly full run — includes the mini-train matrix on macOS.
- cron: "0 4 * * *"
workflow_dispatch:
concurrency:
group: e2e-matrix-${{ github.ref }}
cancel-in-progress: true
jobs:
# On every push/PR: smoke matrix (912 cells). The backend imports MLX, so
# this runs on the repository's persistent Apple Silicon runner.
preset-matrix:
name: Preset matrix (smoke, self-hosted macOS)
runs-on: [self-hosted, macOS, ARM64, cppmega-mlx-macos]
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: vbgui/package-lock.json
- name: Bind repository MLX Python
run: |
python_bin=/Volumes/external/sources/cppmega.mlx/.venv/bin/python
test -x "$python_bin"
echo "VBGUI_E2E_PYTHON=$python_bin" >> "$GITHUB_ENV"
- name: Python deps
run: |
"$VBGUI_E2E_PYTHON" -m pip install --upgrade pip
"$VBGUI_E2E_PYTHON" -m pip install -e ".[gui,parquet,widget]"
"$VBGUI_E2E_PYTHON" -m pip install jsonschema pyarrow tokenizers anywidget
- name: Generate fixtures
run: |
"$VBGUI_E2E_PYTHON" tests/fixtures/build_e2e_matrix.py
- name: Vbgui install + typecheck
working-directory: vbgui
env:
NODE_ENV: development
run: |
npm ci
npm run typecheck
- name: Playwright browsers
working-directory: vbgui
run: npx playwright install chromium
- name: Run preset matrix shard ${{ matrix.shard }}/4
working-directory: vbgui
env:
NODE_ENV: development
CI: "1"
run: |
npx playwright test --config=e2e/playwright.config.ts \
e2e/scenarios/02_preset_matrix.spec.ts \
--shard=${{ matrix.shard }}/4
- name: Upload artefacts
if: always()
uses: actions/upload-artifact@v4
with:
name: preset-matrix-shard-${{ matrix.shard }}
path: |
vbgui/e2e/test-results/
vbgui/e2e/screenshots/
vbgui/e2e/logs/
retention-days: 3
# Specialised + canvas smoke scenarios — run on every push (lightweight).
specialised:
name: Specialised + canvas smoke
runs-on: [self-hosted, macOS, ARM64, cppmega-mlx-macos]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "22", cache: "npm",
cache-dependency-path: vbgui/package-lock.json }
- name: Bind repository MLX Python
run: |
python_bin=/Volumes/external/sources/cppmega.mlx/.venv/bin/python
test -x "$python_bin"
echo "VBGUI_E2E_PYTHON=$python_bin" >> "$GITHUB_ENV"
- run: |
"$VBGUI_E2E_PYTHON" -m pip install --upgrade pip
"$VBGUI_E2E_PYTHON" -m pip install -e ".[gui,parquet,widget]"
"$VBGUI_E2E_PYTHON" -m pip install jsonschema pyarrow tokenizers anywidget
- run: |
"$VBGUI_E2E_PYTHON" tests/fixtures/build_e2e_matrix.py
- working-directory: vbgui
env: { NODE_ENV: development }
run: |
npm ci
npm run typecheck
- working-directory: vbgui
run: npx playwright install chromium
- working-directory: vbgui
env: { NODE_ENV: development, CI: "1" }
run: |
npx playwright test --config=e2e/playwright.config.ts \
e2e/scenarios/01_canvas_smoke.spec.ts \
e2e/scenarios/04_tokenizer_playground.spec.ts \
e2e/scenarios/05_data_inspector.spec.ts \
e2e/scenarios/06_sharding_proposals.spec.ts \
e2e/scenarios/07_gotchas.spec.ts
- if: always()
uses: actions/upload-artifact@v4
with:
name: specialised-results
path: |
vbgui/e2e/test-results/
vbgui/e2e/screenshots/
vbgui/e2e/logs/
retention-days: 3
# Mini-train matrix (192 cells, real mlx) — macOS only, nightly.
mini-train-matrix:
name: Mini-train matrix (macOS, nightly)
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: [self-hosted, macOS, ARM64, cppmega-mlx-macos]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: "22", cache: "npm",
cache-dependency-path: vbgui/package-lock.json }
- name: Bind repository MLX Python
run: |
python_bin=/Volumes/external/sources/cppmega.mlx/.venv/bin/python
test -x "$python_bin"
echo "VBGUI_E2E_PYTHON=$python_bin" >> "$GITHUB_ENV"
- run: |
"$VBGUI_E2E_PYTHON" -m pip install --upgrade pip
"$VBGUI_E2E_PYTHON" -m pip install -e ".[gui,parquet,widget]"
"$VBGUI_E2E_PYTHON" -m pip install jsonschema pyarrow tokenizers anywidget mlx mlx-lm
- run: |
"$VBGUI_E2E_PYTHON" tests/fixtures/build_e2e_matrix.py
- working-directory: vbgui
env: { NODE_ENV: development }
run: |
npm ci
npm run typecheck
- working-directory: vbgui
run: npx playwright install chromium
- working-directory: vbgui
env: { NODE_ENV: development, CI: "1" }
run: |
npx playwright test --config=e2e/playwright.config.ts \
e2e/scenarios/03_train_matrix.spec.ts
- if: always()
uses: actions/upload-artifact@v4
with:
name: mini-train-results
path: |
vbgui/e2e/test-results/
vbgui/e2e/screenshots/
vbgui/e2e/logs/
retention-days: 7
# Matrix report — aggregates shard artefacts into one Markdown
# summary, posted as a build summary + uploaded as standalone artefact.
matrix-report:
name: Matrix report
needs: [preset-matrix, specialised]
runs-on: [self-hosted, Linux, X64, cppmega-mlx]
if: always()
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with: { path: artifacts }
- uses: actions/setup-python@v5
with: { python-version: "3.13" }
- name: Build matrix report
run: |
python tools/build_e2e_matrix_report.py \
--artifacts artifacts \
--output e2e_matrix_report.md
cat e2e_matrix_report.md >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@v4
with:
name: e2e_matrix_report
path: e2e_matrix_report.md
retention-days: 14