Skip to content

Commit 158dfdb

Browse files
committed
improvement(ci): partition desktop acceptance across four runners
1 parent 2f9cc68 commit 158dfdb

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

‎.github/CI.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The long-import and lease-expiration checks remain: they prove distinct survival
6363

6464
Local planner validation is `bun run test:scripts scripts/ci-changes.test.ts scripts/ci-gate.test.ts`. It executes real Turbo queries in small Git fixtures; no application build or database is required. Full builds, services, browser suites, and Electron checks run on hosted CI.
6565

66-
The separate `desktop-e2e` workflow retains its desktop-specific path filters. Its macOS shell smoke suite runs whole files across three isolated runners, with one worker per runner. `scripts/desktop-e2e.ts` asks Playwright to discover the complete suite, then assigns longer files first to the currently lightest shard using `apps/desktop/e2e-durations.json`. Exact escaped file filters preserve serial fixtures. Unmeasured files receive the median measured weight, deleted files cannot select tests, and invalid or empty selections fail. Normal local runs, packaging smoke and the weekly Electron canary keep their existing commands.
66+
The separate `desktop-e2e` workflow retains its desktop-specific path filters. Its macOS shell smoke suite runs whole files across four isolated runners, with one worker per runner. The matrix owns the partition count; job names and runner arguments use `strategy.job-total`. `scripts/desktop-e2e.ts` asks Playwright to discover the complete suite, then assigns longer files first to the currently lightest shard using `apps/desktop/e2e-durations.json`. Exact escaped file filters preserve serial fixtures. Unmeasured files receive the median measured weight, deleted files cannot select tests, and invalid or empty selections fail. Normal local runs, packaging smoke and the weekly Electron canary keep their existing commands.
6767

6868
The current weights are median test durations in seconds from runs [41496623284](https://github.com/simstudioai/sim/actions/runs/41496623284), [41497346251](https://github.com/simstudioai/sim/actions/runs/41497346251), and [41502340540](https://github.com/simstudioai/sim/actions/runs/41502340540). Refresh them from complete `desktop-smoke-reports-*` artifacts when the workload changes: sum `tests[].results[].duration` by `spec.file` in each run, take the median across runs, and divide milliseconds by 1,000. The weights steer scheduling only; Playwright discovery owns coverage. Before adopting new weights, compare repeated paired runs and the complete case/status multiset, including skipped cases and retries.
6969

‎.github/workflows/desktop-e2e.yml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: desktop-e2e
22

3-
# Smoke coverage of the real Electron shell on desktop changes. Three isolated runners
3+
# Smoke coverage of the real Electron shell on desktop changes. Isolated runners
44
# partition complete test files by measured duration; workers remain serial per runner.
55
# The weekly
66
# advisory canary against electron@latest so Chromium-cadence breakage surfaces
@@ -104,14 +104,14 @@ jobs:
104104
run: bun run scripts/build-native.ts --computer-use
105105

106106
e2e:
107-
name: e2e (${{ matrix.shard }}/3)
107+
name: e2e (${{ matrix.shard }}/${{ strategy.job-total }})
108108
if: github.event_name != 'schedule' && github.event_name != 'push'
109109
runs-on: macos-26
110110
timeout-minutes: 30
111111
strategy:
112112
fail-fast: false
113113
matrix:
114-
shard: [1, 2, 3]
114+
shard: [1, 2, 3, 4]
115115
steps:
116116
- name: Checkout code
117117
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
@@ -160,7 +160,7 @@ jobs:
160160

161161
- name: Run Playwright _electron smoke suite
162162
working-directory: apps/desktop
163-
run: bun run ../../scripts/desktop-e2e.ts ${{ matrix.shard }}/3
163+
run: bun run ../../scripts/desktop-e2e.ts ${{ matrix.shard }}/${{ strategy.job-total }}
164164
env:
165165
PLAYWRIGHT_JSON_OUTPUT_FILE: test-results/desktop-smoke.json
166166
BACKGROUND_EXECUTOR_REPORT_PATH: test-results/background-executor-report.json

0 commit comments

Comments
 (0)