@@ -590,9 +590,19 @@ jobs:
590590 # app. So on that runner the list runs two files at a time, each test gets 15 seconds by default
591591 # instead of 5, and the job has an hour. A test's own timeout and every bound a test asserts stay
592592 # as they are. On the larger runners nothing changes: eight workers, 5 seconds, 30 minutes.
593+ #
594+ # In shards, one runner each, as the suite is: one job took 16 to 17 minutes before the browser tests
595+ # no job had ever named were added, and every file is still named here once. `bun test --shard`
596+ # deals the sorted list out in turn. A run is as long as its slowest shard, and a shard as long as
597+ # its slowest file: artifacts-screens, about 11 minutes.
593598 app-browser-webkit :
594- name : app (real browser, WebKit)
599+ name : app (real browser, WebKit) (shard ${{ matrix.shard }} of ${{ strategy.job-total }})
595600 needs : changes
601+ strategy :
602+ # Every shard runs to the end, so one red run names every failing test, as the suite's do.
603+ fail-fast : false
604+ matrix :
605+ shard : [1, 2, 3]
596606 # On a pull request, only when the app, what it imports or its tests change (scripts/ci-changes.ts,
597607 # app_browser_webkit). A merge group and main run it every time.
598608 if : needs.changes.outputs.app_browser_webkit == 'true'
@@ -607,6 +617,7 @@ jobs:
607617 PLAYWRIGHT_IMAGE : mcr.microsoft.com/playwright:v1.62.1-noble@sha256:dcc5531e97840b9b5e794f2814476b21571c5124a3fca2267d73041f56e7580e
608618 TEST_WORKERS : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && '2' || '8' }}
609619 TEST_TIMEOUT_MS : ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && '15000' || '5000' }}
620+ TEST_SHARD : ${{ matrix.shard }}/${{ strategy.job-total }}
610621 steps :
611622 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
612623 with :
@@ -619,22 +630,41 @@ jobs:
619630 - run : |
620631 # One file per line, sorted: pull requests that each add a file then merge cleanly.
621632 files=(
633+ app/tests/access-requests-layout.test.tsx
622634 app/tests/add-custom-mcp-card-layout.test.tsx
623635 app/tests/admin-notion-one-press-layout.test.tsx
636+ app/tests/admin-path-layout.test.tsx
637+ app/tests/admin-request-notify-layout.test.tsx
638+ app/tests/another-account-layout.test.tsx
624639 app/tests/app-frame-skeleton-still.test.tsx
625640 app/tests/approval-answered-layout.test.tsx
626641 app/tests/approval-left-carry-on-browser.test.tsx
642+ app/tests/artifact-bridge-browser.test.ts
643+ app/tests/artifact-collab-browser.test.tsx
644+ app/tests/artifact-error-notice-layout.test.tsx
645+ app/tests/artifact-events-socket.test.ts
646+ app/tests/artifact-kinds-browser.test.tsx
647+ app/tests/artifact-sharing-screens-layout.test.tsx
627648 app/tests/artifact-sign-in-refusal-browser.test.tsx
649+ app/tests/artifact-tool-cards-browser.test.tsx
650+ app/tests/artifacts-kit.test.ts
651+ app/tests/artifacts-screens.test.tsx
652+ app/tests/board-row-layout.test.tsx
653+ app/tests/bot-file-links-browser.test.tsx
628654 app/tests/bot-long-instructions-layout.test.tsx
629655 app/tests/bot-screen-sharp.test.tsx
630656 app/tests/bots-panel-start-conversation.test.tsx
631657 app/tests/browse-apps-pages.test.tsx
658+ app/tests/browse-steps-layout.test.tsx
632659 app/tests/chunk-recovery.test.tsx
660+ app/tests/command-card-layout.test.tsx
633661 app/tests/composer-dictation-language.test.tsx
634662 app/tests/composer-keeps-draft-browser.test.tsx
635663 app/tests/composer-touch-return.test.tsx
636664 app/tests/computer-panel-phone-layout.test.tsx
637665 app/tests/computer-starting-browser.test.tsx
666+ app/tests/connected-bot-mistakes-layout.test.tsx
667+ app/tests/conversation-access-ended.test.tsx
638668 app/tests/conversation-kept-browser.test.tsx
639669 app/tests/conversation-reopen-end.test.tsx
640670 app/tests/conversation-reply-toolbar-layout.test.tsx
@@ -651,7 +681,9 @@ jobs:
651681 app/tests/move-to-cloud-settings.test.tsx
652682 app/tests/moved-apps-reconnect.test.tsx
653683 app/tests/moved-elsewhere.test.tsx
684+ app/tests/name-the-admins-layout.test.tsx
654685 app/tests/new-conversation-picked-model.test.tsx
686+ app/tests/offline-conversation-layout.test.tsx
655687 app/tests/one-press-connect-layout.test.tsx
656688 app/tests/organization-held-actions.test.tsx
657689 app/tests/organization-held-recovery.test.tsx
@@ -663,14 +695,21 @@ jobs:
663695 app/tests/organization-unavailable-chat.test.tsx
664696 app/tests/organization-unavailable-pages.test.tsx
665697 app/tests/people-lists.test.tsx
698+ app/tests/plan-notices-layout.test.tsx
699+ app/tests/queue-send-now-layout.test.tsx
666700 app/tests/rejoin-fresh-token-browser.test.tsx
667701 app/tests/renderer-crash.test.ts
668702 app/tests/roster-working.test.tsx
703+ app/tests/routine-run-now-layout.test.tsx
704+ app/tests/run-ended-unheard-layout.test.tsx
669705 app/tests/section-strip-routines.test.tsx
706+ app/tests/select-scrolls-layout.test.tsx
670707 app/tests/service-terms.test.tsx
671708 app/tests/settings-tool-cards-admin-layout.test.tsx
672709 app/tests/settings-tool-cards-core.test.tsx
673710 app/tests/settings-tool-cards-personal.test.tsx
711+ app/tests/sidebar-current-row.test.tsx
712+ app/tests/sidebar-window-buttons.test.tsx
674713 app/tests/sidebar-zoom-drag.test.tsx
675714 app/tests/sign-in-reconnect-layout.test.tsx
676715 app/tests/sign-in-returns-there.test.tsx
@@ -679,21 +718,27 @@ jobs:
679718 app/tests/step-rows-layout.test.tsx
680719 app/tests/stopped-command-layout.test.tsx
681720 app/tests/stopped-turn-dismiss-browser.test.tsx
721+ app/tests/strip-version-layout.test.tsx
682722 app/tests/table-export-browser.test.tsx
683723 app/tests/team-connections-directory-layout.test.tsx
684724 app/tests/too-many-follow-ups.test.tsx
725+ app/tests/trusted-types-build.test.ts
726+ app/tests/trusted-types.test.ts
685727 app/tests/web-push-browser.test.tsx
686728 app/tests/what-if-handle-browser.test.tsx
729+ app/tests/work-folded-layout.test.tsx
730+ app/tests/workspace-snapshots-layout.test.tsx
687731 )
688732 docker run --rm --ipc=host \
689733 --volume "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" --workdir "$GITHUB_WORKSPACE" \
690734 --volume "$(command -v bun):/usr/local/bin/bun:ro" \
691735 --env OPENBOT_APP_BROWSER=1 --env OPENBOT_APP_ENGINES=chromium,webkit \
692736 "$PLAYWRIGHT_IMAGE" \
693- bun test --parallel="$TEST_WORKERS" --timeout="$TEST_TIMEOUT_MS" "${files[@]}"
737+ bun test --parallel="$TEST_WORKERS" --timeout="$TEST_TIMEOUT_MS" --shard="$TEST_SHARD" "${files[@]}"
694738 # Connect your AI's sign-in code, copied with one press and read back from WebKit's clipboard.
695- # Only that test: the rest of the file runs in Chromium in the job above.
696- - run : |
739+ # Only that test: the rest of the file runs in Chromium in the job above. Once, on the first shard.
740+ - if : matrix.shard == 1
741+ run : |
697742 docker run --rm --ipc=host \
698743 --volume "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" --workdir "$GITHUB_WORKSPACE" \
699744 --volume "$(command -v bun):/usr/local/bin/bun:ro" \
0 commit comments