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