Skip to content

ci(viewer): the viewer's browser tests are part of CI passed, in three balanced legs on a faster WASM build (#1394, #1374) - #1395

Merged
DrunkOnJava merged 12 commits into
mainfrom
ci/viewer-tests-in-ci-passed
Nov 5, 2026
Merged

DrunkOnJava merged 12 commits into
mainfrom
ci/viewer-tests-in-ci-passed

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

The viewer's Playwright suite becomes part of CI passed: viewer-test.yml is a reusable workflow that ci.yml calls as its viewer job in the full set, listed in ci-ok's needs. A pull request cannot merge before the suite has passed on its head. Deploy viewer loses its pull_request trigger; on a push to main it builds and publishes the site and runs the suite and the saved-mesh measurement again on the release WASM it publishes, and its deploy job waits for both and for CI passed.

Motivation

Pull requests merge on full / CI passed alone, and the suite ran in Deploy viewer's pull-request run, which CI passed does not wait for. #1370 merged before that run had finished (skipped as a draft, then cancelled by a later push), and Deploy viewer went red on main (#1374). The maintainer's arm.sh checks the viewer run only when a PR is armed, so a PR updated with main after arming could still merge before the viewer tests reran. Issue: #1394.

Changes

  • .github/workflows/viewer-test.yml (new): the former Deploy viewer build job, with workflow_call and workflow_dispatch (a draft's viewer can still be checked by hand). Permissions: contents: read. Every action keeps its pinned SHA. The legs are a JSON input: ci.yml runs three, groups of spec files packed by length (--shard cuts in file order and put four 30-second Core Interior tests in one shard), and a first step that fails when a spec file is in no leg. The failure report artifact is now playwright-report-<leg> (three legs cannot share a name; nothing reads it by name); viewer-saved-meshes-measurement is unchanged.
  • ci.yml: job viewer, in the full set only, with viewer-paths before it, which skips the viewer for a pull request that changes nothing but documentation (the file list Deploy viewer's deploy step already uses, except docs/viewer-demos.json and docs/support-matrix.json, which the viewer is built from; an answer the API does not give runs the tests). Both are in ci-ok's needs; a skipped job passes. It passes release_wasm: false.
  • The WASM for CI is built without LTO, at 16 codegen units: 55 s warm against 150 to 225 s for the release profile, and every leg waits for it. This is a decision for the maintainer: the suite in CI passed tests a different build from the one published. Deploy viewer therefore runs the suite and the measurement again on the release build before it deploys. release_wasm: true in ci.yml (one line) tests the release build in CI, at about 1 to 2 minutes more per leg (150 to 225 s of build against 82 to 126 s).
  • The saved-mesh measurement (12 minutes of every pull request's run) leaves CI passed for Deploy viewer. Its only gating assertion on the toggle, on Core Interior, stays in the suite (saved-meshes-measure.spec.ts runs its toggle test in the suite and its per-model sweep only with RVT_VIEWER_MEASURE=1); the per-model sweep (Core Interior, Einhoven, RE1 x 4, each on and off) is now post-merge only.
  • Playwright installs without --with-deps: its apt step added fonts only, and the mirror stalled on them for four minutes in two of three legs of one run. RVT_VIEWER_FULLY_PARALLEL=1 (CI only) lets Playwright run tests of a file in parallel. gen-fixture is built beside the WASM, and the four RE1 models are cached on their pinned commit.
  • deploy-viewer.yml: no pull_request trigger; jobs build, tests, measure; deploy needs all three.
  • RELEASE.md, CONTRIBUTING.md, docs/maintaining.md, docs/library.md, viewer/README.md; changelog.d/changed/1394-viewer-tests-in-ci-passed.md.

Testing

Unit tests are banned in this repository; this is a workflow change, verified by running it.

  • YAML parses (ruby -ryaml) on the four workflow files; actionlint reports the same 18 findings as on main, none new; file modes unchanged (the new file is 0644)
  • python3 tools/release/changelog.py check and tools/ci/api-doc-ids.py pass
  • This pull request's own full CI runs (below) pass, with the viewer-paths and viewer jobs in them. Deploy viewer dispatched on the branch (runs 41925472744, 41933471380, 41937570817): build, tests and measure pass and deploy is skipped, as it is off main.
  • N/A: no Revit files, exporter, or performance path is touched

Timing

Before this change a full CI run took 7.2 minutes (median of 11 recent runs, 5.9 to 9.2, first job start to last job end) and its longest job 6.7 (5.7 to 9.1). The viewer's job in Deploy viewer took 11.8 to 20.5 minutes (median 16.5, 12 runs): WASM build 230 s, demos 71 s, suite 377 s, measurement 218 s. Run to run, one runner's speed varies by a factor of two (the same Core Interior test took 26 s and 66 s).

This pull request, full CI, first job start to last job end, and its viewer legs (minutes):

Run Change CI Legs
41922224847 one job split in three: two shards and the measurement 13.1 12.4, 10.3, 6.4
41925463765 measurement out of CI, three shards, tests in parallel 11.2 10.9, 10.6, 5.9
41927452283 Playwright without apt (it stalled 273 s) 7.6 7.3, 6.3, 6.2
41929893723 four shards 8.2 7.5, 7.2, 5.3, 4.8
41931534840 spec files in groups 8.8 8.6, 5.2, 4.4
41933470205 WASM without LTO, cold cache, then warm 5.9, 7.0 5.7, 5.3, 5.1; 6.8, 5.4, 4.8
41935597082 RE1 models cached 7.3 6.1, 3.8, 3.5
41936666251 stop test to the second leg 6.5, 7.3 4.7, 4.5, 4.3; 6.3, 4.0, 3.8

The last two runs are the final workflow. In one the longest job was the Python wheel (6.5) and the viewer's longest leg 4.7; in the other the viewer's longest leg ran 6.3 minutes, starting 0.9 after the first job, and ended 0.9 after the longest other job (Python wheel, 5.7). So the viewer adds between 0 and about 1 minute to a full run, inside the variation between runs. What holds the legs now is the build every leg repeats (82 to 126 s) and the tests (106 to 180 s), whose longest single test is the 114-second toggle; the rest is runner speed and a queue of up to a minute and a half before a leg starts.

Audit-honesty checklist

  • README / docs reflect the current state after this PR
  • A user-visible change has its entry as a fragment under changelog.d/changed/
  • No emojis, private paths or personal addresses in committed files

Breaking changes

None. The required check is still full / CI passed. Deploy viewer's pull-request run no longer exists; nothing requires it by name.

Related issues

Closes #1394. Refs #1374.

@DrunkOnJava DrunkOnJava added area:ci Work in the ci area. type:ci Continuous integration or automation work. ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes labels Nov 4, 2026
@DrunkOnJava
DrunkOnJava marked this pull request as ready for review November 4, 2026 22:06
Comment thread .github/workflows/ci.yml Fixed
Comment thread .github/workflows/viewer-test.yml Fixed
@DrunkOnJava DrunkOnJava removed the ready-when-green Draft whose code is complete: marked ready for review once its fast CI passes label Nov 4, 2026
…easurement leaves CI passed for Deploy viewer, and the toggle test stays in the suite (#1394)
Comment thread .github/workflows/ci.yml Fixed
…t cache is saved on main only, and the docs say the suite runs again on the release WASM (#1394)
…iewer-regression leg is no longer 213 s against 105 (#1394)
@DrunkOnJava DrunkOnJava changed the title ci(viewer): the viewer's browser tests are part of CI passed, in three parallel legs (#1394, #1374) ci(viewer): the viewer's browser tests are part of CI passed, in three balanced legs on a faster WASM build (#1394, #1374) Nov 5, 2026
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) November 5, 2026 00:12
@DrunkOnJava
DrunkOnJava merged commit 77d71cb into main Nov 5, 2026
35 checks passed
@DrunkOnJava
DrunkOnJava deleted the ci/viewer-tests-in-ci-passed branch November 5, 2026 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ci Work in the ci area. type:ci Continuous integration or automation work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: the viewer's browser tests are part of CI passed, so a PR cannot merge before they pass on its head (#1374)

2 participants