Use NSWorkspace to launch app in display resolution UI test
XCUIApplication.launch() hard-fails with a 60-second timeout when it can't foreground the app on headless CI runners. This test never uses XCUIApplication for interaction (no taps/keys) — it only reads a diagnostics file. Replace with NSWorkspace.openApplication which launches through Launch Services, passes env vars via OpenConfiguration, and returns immediately without blocking on activation failure. Also add CI retry loop since runner environment is flaky. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fc858fcfa4
commit
ae064802c6
2 changed files with 95 additions and 30 deletions
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
|
|
@ -495,12 +495,23 @@ jobs:
|
|||
{"helperBinaryPath":"$HELPER_PATH"}
|
||||
EOF
|
||||
|
||||
xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \
|
||||
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
|
||||
-disableAutomaticPackageResolution \
|
||||
-destination "platform=macOS" \
|
||||
-only-testing:cmuxUITests/DisplayResolutionRegressionUITests \
|
||||
test
|
||||
for attempt in 1 2; do
|
||||
if xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug \
|
||||
-clonedSourcePackagesDirPath "$SOURCE_PACKAGES_DIR" \
|
||||
-disableAutomaticPackageResolution \
|
||||
-destination "platform=macOS" \
|
||||
-only-testing:cmuxUITests/DisplayResolutionRegressionUITests \
|
||||
test; then
|
||||
exit 0
|
||||
fi
|
||||
if [ "$attempt" -eq 2 ]; then
|
||||
echo "Display resolution UI regression failed after 2 attempts" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "Attempt $attempt failed, retrying..."
|
||||
pkill -x "cmux DEV" 2>/dev/null || true
|
||||
sleep 3
|
||||
done
|
||||
|
||||
- name: Run browser find focus UI regression
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue