Add persistent virtual display for all UI regression tests
The browser find focus test was failing because XCUIApplication.launch() cannot foreground-activate the app on headless CI runners (WarpBuild) without a display. The display resolution test already had its own virtual display, but it was scoped to that step only. Create a persistent virtual display at the start of the ui-regressions job that stays alive for all test steps. Also switch the browser test from `test` to `test-without-building` since the build step already ran. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
81aaa8e2d0
commit
381aab0d83
1 changed files with 39 additions and 1 deletions
40
.github/workflows/ci.yml
vendored
40
.github/workflows/ci.yml
vendored
|
|
@ -488,6 +488,36 @@ jobs:
|
|||
-destination "platform=macOS" \
|
||||
build-for-testing
|
||||
|
||||
- name: Create persistent virtual display
|
||||
run: |
|
||||
set -euo pipefail
|
||||
HELPER_PATH="/tmp/create-virtual-display"
|
||||
clang -framework Foundation -framework CoreGraphics \
|
||||
-o "$HELPER_PATH" scripts/create-virtual-display.m
|
||||
|
||||
VDISPLAY_READY="/tmp/cmux-vdisplay-persistent.ready"
|
||||
VDISPLAY_ID_PATH="/tmp/cmux-vdisplay-persistent.id"
|
||||
rm -f "$VDISPLAY_READY" "$VDISPLAY_ID_PATH"
|
||||
|
||||
"$HELPER_PATH" \
|
||||
--modes "1920x1080" \
|
||||
--ready-path "$VDISPLAY_READY" \
|
||||
--display-id-path "$VDISPLAY_ID_PATH" \
|
||||
> /tmp/cmux-vdisplay-persistent.log 2>&1 &
|
||||
echo "VDISPLAY_PERSISTENT_PID=$!" >> "$GITHUB_ENV"
|
||||
|
||||
echo "Waiting for persistent virtual display..."
|
||||
for i in $(seq 1 24); do
|
||||
if [ -f "$VDISPLAY_READY" ]; then break; fi
|
||||
sleep 0.5
|
||||
done
|
||||
if [ ! -f "$VDISPLAY_READY" ]; then
|
||||
echo "ERROR: Persistent virtual display not ready after 12s" >&2
|
||||
cat /tmp/cmux-vdisplay-persistent.log 2>/dev/null || true
|
||||
exit 1
|
||||
fi
|
||||
echo "Persistent virtual display ready: ID=$(cat "$VDISPLAY_ID_PATH")"
|
||||
|
||||
- name: Run display resolution churn UI regression
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
|
@ -661,4 +691,12 @@ jobs:
|
|||
-destination "platform=macOS" \
|
||||
-maximum-test-execution-time-allowance 120 \
|
||||
-only-testing:cmuxUITests/BrowserPaneNavigationKeybindUITests/testCmdFFocusesBrowserFindFieldAfterCmdDCmdLNavigation \
|
||||
test
|
||||
test-without-building
|
||||
|
||||
- name: Cleanup persistent virtual display
|
||||
if: always()
|
||||
run: |
|
||||
if [ -n "${VDISPLAY_PERSISTENT_PID:-}" ]; then
|
||||
kill "$VDISPLAY_PERSISTENT_PID" >/dev/null 2>&1 || true
|
||||
fi
|
||||
rm -f /tmp/cmux-vdisplay-persistent.ready /tmp/cmux-vdisplay-persistent.id /tmp/cmux-vdisplay-persistent.log
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue