Skip to content

Commit dc4bfa2

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

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
@@ -516,17 +516,18 @@ jobs:
516516
# Bundle only: `bun run build` also fetches the macOS node-pty prebuilds for packaging,
517517
# which a Linux run does not use.
518518
(cd apps/desktop && bun run scripts/build.ts)
519-
# Each app runs in its own session, and stop-session.sh returns once all of it has exited.
519+
# Each app runs in its own session under an E2E_APP tag, and stop-session.sh returns once
520+
# every process it started has exited.
520521
(cd apps/realtime && PORT=3023 SIM_DB_ROLE=realtime ALLOWED_ORIGINS="$NEXT_PUBLIC_APP_URL" \
521-
exec setsid bun src/index.ts > "$report_dir/desktop-tools-realtime.log" 2>&1) &
522+
E2E_APP=desktop-realtime exec setsid bun src/index.ts > "$report_dir/desktop-tools-realtime.log" 2>&1) &
522523
realtime_pid=$!
523-
(cd apps/sim && exec setsid node ../../node_modules/next/dist/bin/next dev --hostname 127.0.0.1 \
524+
(cd apps/sim && E2E_APP=desktop-tools exec setsid node ../../node_modules/next/dist/bin/next dev --hostname 127.0.0.1 \
524525
--port 3021 > "$report_dir/desktop-tools-next.log" 2>&1) &
525526
server_pid=$!
526527
finish() {
527528
status=$?
528-
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$server_pid" || status=1
529-
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$realtime_pid" || status=1
529+
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$server_pid" desktop-tools || status=1
530+
bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$realtime_pid" desktop-realtime || status=1
530531
wait "$server_pid" "$realtime_pid" 2>/dev/null || true
531532
exit "$status"
532533
}

0 commit comments

Comments
 (0)