Skip to content

Commit ef3db95

Browse files
authored
ci: build the docsite once, run its browser contracts on that build, keep docsite-test as the required join (#9877)
* ci: build the docsite once in docsite-build, run its browser contracts on that build in docsite-browser, and keep docsite-test as the required join docsite-build builds the packages and the docsite once, runs the data tests and the production registry gate, and uploads the build (about 70 MB: the server and static output, generated data and theme, the ShadCN registry and the playground's vendored assets; no compile cache, traces, source maps or file traces) stamped with its commit. docsite-browser downloads that build, fails unless it is of the commit it checked out, and runs the browser contracts as a one-leg matrix planned by recorded time. docsite-test stays the required context as a join that fails on a failed, cancelled or skipped leg. The contracts skip only for component tests, stories, spec records and changesets that are not shared infrastructure (full_suite). The interaction planner becomes playwright-legs.mjs for all three leg lanes. * Merge branch 'main' into ci/docsite-build-browser-split
1 parent 3ac3d02 commit ef3db95

14 files changed

Lines changed: 665 additions & 276 deletions
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"chromium": {
2+
"interaction-chromium": {
33
"internal/interaction-harness/src/harness.interaction.browser.spec.ts": 118.3,
44
"internal/interaction-harness/src/storybook.interaction.browser.spec.ts": 1.6,
55
"packages/core/src/AlertDialog/__tests__/AlertDialog.interaction.browser.spec.ts": 20.3,
@@ -28,13 +28,21 @@
2828
"packages/core/src/motion/__tests__/animatedLayoutAdopters.interaction.browser.spec.ts": 24.5,
2929
"packages/core/src/motion/__tests__/animator.interaction.browser.spec.ts": 16.6
3030
},
31-
"webkit": {
31+
"interaction-webkit": {
3232
"internal/interaction-harness/src/harness.interaction.browser.spec.ts": 168.8,
3333
"internal/interaction-harness/src/storybook.interaction.browser.spec.ts": 8.8,
3434
"packages/core/src/gestures/__tests__/browser/gestures.interaction.browser.spec.ts": 51.6,
3535
"packages/core/src/gestures/__tests__/browser/presentedHitTesting.interaction.browser.spec.ts": 6.6,
3636
"packages/core/src/hooks/__tests__/usePager.interaction.browser.spec.ts": 35.5,
3737
"packages/core/src/motion/__tests__/animatedLayout.interaction.browser.spec.ts": 41.8,
3838
"packages/core/src/motion/__tests__/animator.interaction.browser.spec.ts": 24.5
39+
},
40+
"docsite": {
41+
"blog-heading-links.spec.ts": 22.7,
42+
"blog-live-examples.spec.ts": 26,
43+
"header-offset.spec.ts": 6,
44+
"internal-docs-prompt.spec.ts": 98,
45+
"mobile-navigation.spec.ts": 8,
46+
"playground-preview-isolation.spec.ts": 113.8
3947
}
4048
}

‎.github/scripts/ci-admission.test.mjs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,11 +183,21 @@ describe('where runs wait', () => {
183183
)
184184
continue;
185185
if (NO_WORK_ALONE.includes(id)) continue;
186+
// Runs only after a job that stops behind a full admission succeeded.
187+
if (
188+
needsOf(job).some(
189+
need =>
190+
condition.includes(`needs.${need}.result == 'success'`) &&
191+
String(ci.jobs[need]?.if ?? '').includes(FULL_GUARD),
192+
)
193+
)
194+
continue;
186195
expect(needsOf(job), id).toContain('admission');
187196
expect(condition, id).toContain(FULL_GUARD);
188197
guarded.push(id);
189198
}
190199
expect(guarded.sort()).toEqual([
200+
'docsite-build',
191201
'pr-component-a11y-contracts',
192202
'pr-interaction',
193203
'pr-interaction-webkit',

0 commit comments

Comments
 (0)