Skip to content

Commit 886f276

Browse files
committed
improvement(desktop): run the live desktop E2E in its own job on a larger runner
1 parent 73a21e6 commit 886f276

1 file changed

Lines changed: 63 additions & 9 deletions

File tree

‎.github/workflows/test-build.yml‎

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ jobs:
123123
http-e2e:
124124
name: End-to-end over real HTTP
125125
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-8vcpu-ubuntu-2404' || 'ubuntu-latest' }}
126-
# Five suites, each starting its own dev app, run in sequence.
127-
timeout-minutes: 45
126+
# Four suites, each starting its own dev app, run in sequence.
127+
timeout-minutes: 30
128128
services:
129129
postgres:
130130
image: pgvector/pgvector:pg17
@@ -433,9 +433,64 @@ jobs:
433433
DESKTOP_INBOX_E2E_REPORT_PATH="$report_dir/desktop-inbox-http-report.json" \
434434
bun run test:desktop-inbox:e2e
435435
436-
# Desktop tools in the real Electron app against a local app with Redis and its realtime
437-
# server: chat switches, Stop, sign-out, approval and the flag-off foreground round trip.
438-
# The spec runs the recording proxy (the app's public origin) and the stand-in worker.
436+
- name: Upload end-to-end reports and server logs
437+
if: failure()
438+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
439+
with:
440+
name: http-e2e-reports
441+
path: ${{ runner.temp }}/e2e/
442+
if-no-files-found: ignore
443+
retention-days: 7
444+
445+
# Desktop tools in the real Electron app against a local app, on its own runner: the
446+
# Electron app, the dev app and its realtime server together outgrow the http-e2e runner.
447+
desktop-live-e2e:
448+
name: Desktop tools against a local app
449+
runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-16vcpu-ubuntu-2404' || 'ubuntu-latest' }}
450+
timeout-minutes: 30
451+
services:
452+
postgres:
453+
image: pgvector/pgvector:pg17
454+
env:
455+
POSTGRES_USER: postgres
456+
POSTGRES_PASSWORD: postgres
457+
POSTGRES_DB: sim_test
458+
ports:
459+
- 5432:5432
460+
options: >-
461+
--health-cmd "pg_isready -U postgres -d sim_test"
462+
--health-interval 5s
463+
--health-timeout 5s
464+
--health-retries 10
465+
redis:
466+
image: redis:7-alpine
467+
ports:
468+
- 6379:6379
469+
options: >-
470+
--health-cmd "redis-cli ping"
471+
--health-interval 5s
472+
--health-timeout 5s
473+
--health-retries 10
474+
env:
475+
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/sim_test
476+
BETTER_AUTH_SECRET: desktop-live-e2e-ci-secret-at-least-32-characters
477+
ENCRYPTION_KEY: '0000000000000000000000000000000000000000000000000000000000000000'
478+
479+
steps:
480+
- name: Checkout code
481+
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
482+
483+
- name: Setup workspace
484+
uses: ./.github/actions/setup-workspace
485+
with:
486+
provider: ${{ vars.CI_PROVIDER }}
487+
488+
- name: Provision the database through migrations
489+
working-directory: packages/db
490+
run: bun run db:migrate
491+
492+
# Chat switches, Stop, sign-out, approval and the flag-off foreground round trip. The spec
493+
# runs the recording proxy (the app's public origin) and the stand-in worker.
439494
- name: Verify desktop tools in the Electron app against a local app
440495
env:
441496
NEXT_PUBLIC_APP_URL: http://127.0.0.1:3020
@@ -480,7 +535,6 @@ jobs:
480535
[ $((SECONDS - started)) -lt "$READY_TIMEOUT_SECONDS" ] || { echo '::error::Local app did not become ready'; exit 1; }
481536
sleep 2
482537
done
483-
(while sleep 15; do echo "memory: $(free -m | awk '/Mem:/ {print $7}') MB available"; done) &
484538
cd apps/desktop
485539
SIM_DESKTOP_E2E_SIM_URL=http://127.0.0.1:3021 \
486540
SIM_DESKTOP_E2E_PROXY_PORT=3020 \
@@ -489,13 +543,13 @@ jobs:
489543
SIM_DESKTOP_E2E_REDIS_URL="$REDIS_URL" \
490544
SIM_DESKTOP_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \
491545
xvfb-run -a -s '-screen 0 1920x1200x24' bunx playwright test e2e/desktop-tools-live-sim.spec.ts \
492-
--output "$report_dir/desktop-tools-results" --reporter=line --retries=0
546+
--output "$report_dir/desktop-tools-results"
493547
494-
- name: Upload end-to-end reports and server logs
548+
- name: Upload Electron E2E results and server logs
495549
if: failure()
496550
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
497551
with:
498-
name: http-e2e-reports
552+
name: desktop-live-e2e-results
499553
path: ${{ runner.temp }}/e2e/
500554
if-no-files-found: ignore
501555
retention-days: 7

0 commit comments

Comments
 (0)