Handle UI test retry without exiting early
This commit is contained in:
parent
f070a72260
commit
66a87dc25e
1 changed files with 4 additions and 2 deletions
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue