11name : Desktop E2E
22
3- # Smoke coverage of the real Electron shell, plus an advisory canary leg
4- # against electron@latest so Chromium-cadence breakage surfaces before an
5- # upgrade is attempted (U18/U22).
6- #
7- # Manual-only for now: the desktop app is tested locally, so the
8- # pull_request trigger is disabled until desktop CI is turned back on.
3+ # Smoke coverage of the real Electron shell on desktop changes, plus a weekly
4+ # advisory canary against electron@latest so Chromium-cadence breakage surfaces
5+ # before an upgrade is attempted.
96
107on :
8+ pull_request :
9+ paths :
10+ - ' .github/workflows/desktop-e2e.yml'
11+ - ' .github/workflows/desktop-release.yml'
12+ - ' apps/desktop/**'
13+ - ' apps/sim/public/brand/fonts/**'
14+ - ' packages/desktop-bridge/**'
15+ - ' packages/browser-protocol/**'
16+ - ' packages/terminal-protocol/**'
17+ - ' packages/logger/**'
18+ - ' packages/security/**'
19+ - ' packages/tsconfig/**'
20+ - ' packages/utils/**'
21+ - ' bun.lock'
22+ - ' package.json'
23+ schedule :
24+ - cron : ' 23 9 * * 1'
1125 workflow_dispatch :
1226
1327permissions :
@@ -18,14 +32,10 @@ concurrency:
1832 cancel-in-progress : true
1933
2034jobs :
21- e2e :
22- name : E2E (${{ matrix.electron }})
35+ e2e-pinned :
36+ name : E2E (pinned)
37+ if : github.event_name != 'schedule'
2338 runs-on : macos-26
24- strategy :
25- fail-fast : false
26- matrix :
27- electron : [pinned, latest]
28- continue-on-error : ${{ matrix.electron == 'latest' }}
2939 steps :
3040 - name : Checkout code
3141 uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
@@ -38,10 +48,42 @@ jobs:
3848 - name : Install dependencies
3949 run : bun install --frozen-lockfile
4050
41- - name : Switch to electron@latest (canary)
42- if : matrix.electron == 'latest'
51+ - name : Bundle main and preload
52+ working-directory : apps/desktop
53+ run : bun run build
54+
55+ - name : Run Playwright _electron smoke suite
56+ working-directory : apps/desktop
57+ run : bunx playwright test
58+
59+ - name : Upload test results
60+ if : failure()
61+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
62+ with :
63+ name : desktop-e2e-results-pinned
64+ path : apps/desktop/test-results
65+ retention-days : 7
66+
67+ e2e-latest-canary :
68+ name : E2E (electron@latest canary)
69+ if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
70+ runs-on : macos-26
71+ continue-on-error : true
72+ steps :
73+ - name : Checkout code
74+ uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
75+
76+ - name : Setup Bun
77+ uses : oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
78+ with :
79+ bun-version : 1.3.14
80+
81+ - name : Install dependencies
82+ run : bun install --frozen-lockfile
83+
84+ - name : Switch to electron@latest
4385 working-directory : apps/desktop
44- run : bun add -d electron@latest
86+ run : bun add --no-save - d electron@latest
4587
4688 - name : Bundle main and preload
4789 working-directory : apps/desktop
@@ -53,14 +95,15 @@ jobs:
5395
5496 - name : Upload test results
5597 if : failure()
56- uses : actions/upload-artifact@v4
98+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
5799 with :
58- name : desktop-e2e-results-${{ matrix.electron }}
100+ name : desktop-e2e-results-latest
59101 path : apps/desktop/test-results
60102 retention-days : 7
61103
62104 package-smoke :
63105 name : Unsigned package smoke
106+ if : github.event_name != 'schedule'
64107 runs-on : macos-26
65108 steps :
66109 - name : Checkout code
72115 bun-version : 1.3.14
73116
74117 - name : Setup Node
75- uses : actions/setup-node@v4
118+ uses : actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
76119 with :
77120 node-version : 22
78121
@@ -85,4 +128,20 @@ jobs:
85128 CSC_IDENTITY_AUTO_DISCOVERY : ' false'
86129 run : |
87130 bun run build
88- bunx electron-builder --mac dir --publish never
131+ bunx electron-builder --mac dir --universal --publish never \
132+ -c.mac.identity=- -c.mac.hardenedRuntime=false
133+
134+ - name : Run packaged Electron smoke suite
135+ working-directory : apps/desktop
136+ run : |
137+ APP_BUNDLE="$(find release -maxdepth 2 -name '*.app' -print -quit)"
138+ if [ -z "$APP_BUNDLE" ]; then
139+ echo "::error::Packaged app bundle was not found."
140+ exit 1
141+ fi
142+ EXECUTABLE="$(find "$APP_BUNDLE/Contents/MacOS" -maxdepth 1 -type f -perm -111 -print -quit)"
143+ if [ -z "$EXECUTABLE" ]; then
144+ echo "::error::Packaged app executable was not found."
145+ exit 1
146+ fi
147+ SIM_DESKTOP_EXECUTABLE="$EXECUTABLE" bunx playwright test e2e/packaged-smoke.spec.ts
0 commit comments