From 66a87dc25ed998f3c16cb98bcbb7ae1b5db4fcfc Mon Sep 17 00:00:00 2001 From: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Date: Wed, 28 Jan 2026 15:28:42 -0800 Subject: [PATCH] Handle UI test retry without exiting early --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfab384b..1751e3ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,14 +98,16 @@ jobs: status=${PIPESTATUS[0]} set -e - if [ "$status" -ne 0 ] && grep -q "Timed out while enabling automation mode" "$log_file"; then + if [ "$status" -ne 0 ] && grep -qE "Failed to initialize for UI testing|Timed out while enabling automation mode" "$log_file"; then echo "UI automation timed out. Retrying once after a short delay..." sleep 5 + set +e run_xcodebuild 2>&1 | tee -a "$log_file" status=${PIPESTATUS[0]} + set -e fi - if [ "$status" -ne 0 ] && grep -q "Timed out while enabling automation mode" "$log_file"; then + if [ "$status" -ne 0 ] && grep -qE "Failed to initialize for UI testing|Timed out while enabling automation mode" "$log_file"; then echo "UI automation mode is unavailable on this runner. Skipping UI tests." rm -f "$log_file" exit 0