Commit ae8274a
committed
ci: enable Hub-Client E2E Tests workflow
The workflow had never actually run on a runner — every push to main
since it was added queued for the 24-hour GitHub Actions maximum and
was cancelled because `runs-on: ubuntu-latest-8x` isn't a runner label
this repo can request. Switching to `ubuntu-latest` unblocked
everything else; from there the workflow itself needed several layers
of fixes to actually pass.
Workflow fixes (hub-client-e2e.yml, with parallel changes to
ts-test-suite.yml where applicable):
- Runner label: ubuntu-latest-8x → ubuntu-latest.
- Build order: build the WASM module before the TypeScript packages,
since hub-client's vite build imports the WASM JS glue.
- WASM tooling: install wasm-bindgen-cli pinned to the version in
Cargo.lock, and add the rust-src component (required by
-Zbuild-std=std,panic_unwind in the wasm-quarto-hub-client crate's
.cargo/config.toml).
- Rust nightly: invoke dtolnay/rust-toolchain@master with no
`toolchain:` input so the action reads the pin from
rust-toolchain.toml (bd-at72, nightly-2026-04-28 from main).
Single source of truth — no duplicate `RUSTUP_TOOLCHAIN` env var.
- dtolnay/rust-toolchain action: dated nightlies need @master with a
toolchain input, not @nightly-YYYY-MM-DD as a ref.
- TypeScript build scoping: only build ts-packages + hub-client. The
q2-demos workspaces fail their vite build (vite can't resolve an
absolute import in the wasm-bindgen output) and trace-viewer is out
of scope. Tracked as bd-1jnb.
- Pre-build the hub binary: globalSetup launches it with `cargo run
--bin hub` and waits 120s for "Hub server listening" — on a cold
runner the cargo compile exceeded that.
- Baseline-commit step: switch the broken `**` glob to `find ... -name
'*-snapshots' -exec git add -f {} +` (bash globstar isn't enabled by
default; visual specs sit directly under hub-client/e2e/, not one
directory deeper) and grant `contents: write` so the default
GITHUB_TOKEN can push the auto-generated baselines back to the
branch.
- Add a `pull_request` trigger with the same path filter as `push`,
so PRs that touch hub-client or the workflow file have to prove
themselves green before merging.
Test-side bugs that surfaced once the workflow could actually run:
- TS2345 in client.test.ts: installMockRepo used
`ReturnType<typeof createMockHandle>` without supplying T, so the
parameter defaulted to unknown. Forwarding T through makes the
helper generic and the test compiles again.
- Node-side IndexedDB shim: projectFactory.ts runs in the Playwright
test process (Node, not browser) but createSyncClient instantiates
an IndexedDBStorageAdapter unconditionally. Import
fake-indexeddb/auto, matching how sync-test-harness already handles
vitest.
- Vite proxy target: hub-client's vite.config.ts proxies /auth/* and
the websocket to VITE_HUB_SERVER (default http://localhost:3000),
but globalSetup starts the e2e hub on port 3030 — so vite returned
HTTP 500 from /auth/me on every test, blocking the in-browser
hub-client from rendering the preview iframe. Pass
VITE_HUB_SERVER=http://localhost:3030 to the webServer env.
- Functional config picks up visual specs: testDir './e2e' with no
testIgnore was finding setup-screens.visual.spec.ts and running it
through the functional config, which has no missing-baseline retry.
Skip *.visual.spec.ts so those run only via playwright.visual.config.ts.
- CI workers: drop from 4 to 2. The 4-workers value was sized for the
original ubuntu-latest-8x; under ubuntu-latest (2 cores) random
tests stalled in the WASM render pipeline and missed the 45s
preview-iframe deadline non-deterministically. Reproduced locally
with 4 workers (a different test failed each run); 2 workers
cleared all flakes.
- Hub-client WASM gap (bd-izfv): the project-render path
(RenderToHtmlRenderer) drops the user_grammars provider on the
floor, so the smoke-all fixture
highlighting/03-user-grammar/03-user-grammar-toml.qmd renders a
bare <code> block instead of highlighted TOML. Add a
SKIP_WASM_UNSUPPORTED map in smokeAllDiscovery.ts pointing at
bd-izfv (which has a complete TDD plan on branch
beads/bd-izfv-thread-user-grammars).
Also adds the missing Playwright visual regression baselines under
hub-client/e2e/ that the visual config expects on first run.1 parent 16a8d67 commit ae8274a
13 files changed
Lines changed: 102 additions & 17 deletions
File tree
- .github/workflows
- hub-client
- e2e
- helpers
- setup-screens.visual.spec.ts-snapshots
- ts-packages/quarto-sync-client/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
| |||
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
22 | 31 | | |
23 | 32 | | |
24 | 33 | | |
| |||
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
35 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
36 | 50 | | |
37 | 51 | | |
38 | 52 | | |
39 | 53 | | |
| 54 | + | |
40 | 55 | | |
41 | 56 | | |
42 | 57 | | |
| |||
51 | 66 | | |
52 | 67 | | |
53 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
54 | 77 | | |
55 | 78 | | |
56 | 79 | | |
| |||
69 | 92 | | |
70 | 93 | | |
71 | 94 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
| 95 | + | |
| 96 | + | |
76 | 97 | | |
77 | 98 | | |
78 | 99 | | |
79 | 100 | | |
80 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
81 | 121 | | |
82 | 122 | | |
83 | 123 | | |
| |||
112 | 152 | | |
113 | 153 | | |
114 | 154 | | |
115 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
116 | 159 | | |
117 | 160 | | |
118 | 161 | | |
119 | 162 | | |
120 | 163 | | |
121 | | - | |
| 164 | + | |
122 | 165 | | |
123 | 166 | | |
124 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
52 | 59 | | |
53 | 60 | | |
54 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
23 | 33 | | |
24 | 34 | | |
25 | 35 | | |
| |||
231 | 241 | | |
232 | 242 | | |
233 | 243 | | |
234 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
235 | 253 | | |
236 | 254 | | |
237 | 255 | | |
| |||
0 commit comments