Skip to content

Commit 2163653

Browse files
committed
improvement(desktop): stop the live E2E apps by their E2E_APP tags
1 parent 102dab9 commit 2163653

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,18 @@ jobs:
512512
# Bundle only: `bun run build` also fetches the macOS node-pty prebuilds for packaging,
513513
# which a Linux run does not use.
514514
(cd apps/desktop && bun run scripts/build.ts)
515-
# Each app runs in its own session, and stop-session.sh returns once all of it has exited.
515+
# Each app runs in its own session under an E2E_APP tag, and stop-session.sh returns once
516+
# every process it started has exited.
516517
(cd apps/realtime && PORT=3023 SIM_DB_ROLE=realtime ALLOWED_ORIGINS="$NEXT_PUBLIC_APP_URL" \
517-
exec setsid bun src/index.ts > "$report_dir/desktop-tools-realtime.log" 2>&1) &
518+
E2E_APP=desktop-realtime exec setsid bun src/index.ts > "$report_dir/desktop-tools-realtime.log" 2>&1) &
518519
realtime_pid=$!
519-
(cd apps/sim && exec setsid node ../../node_modules/next/dist/bin/next dev --hostname 127.0.0.1 \
520+
(cd apps/sim && E2E_APP=desktop-tools exec setsid node ../../node_modules/next/dist/bin/next dev --hostname 127.0.0.1 \
520521
--port 3021 > "$report_dir/desktop-tools-next.log" 2>&1) &
521522
server_pid=$!
522523
finish() {
523524
status=$?
524-
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$server_pid" || status=1
525-
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$realtime_pid" || status=1
525+
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$server_pid" desktop-tools || status=1
526+
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$realtime_pid" desktop-realtime || status=1
526527
wait "$server_pid" "$realtime_pid" 2>/dev/null || true
527528
exit "$status"
528529
}

0 commit comments

Comments
 (0)