mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
CI: Add retry mechanism (#2915)
This commit is contained in:
committed by
GitHub
parent
4b4fa1c390
commit
471703bea6
21
.github/workflows/run-unit-tests.yml
vendored
21
.github/workflows/run-unit-tests.yml
vendored
@@ -86,7 +86,26 @@ jobs:
|
||||
brew services start colima
|
||||
brew install docker
|
||||
colima delete
|
||||
colima start --network-address --arch x86_64 --cpu=1 --memory=1
|
||||
# Attempt to start Colima
|
||||
ATTEMPT_LIMIT=3
|
||||
|
||||
start_colima() {
|
||||
colima start --network-address --arch x86_64 --cpu=1 --memory=1
|
||||
}
|
||||
|
||||
for i in $(seq 1 $ATTEMPT_LIMIT); do
|
||||
if start_colima; then
|
||||
echo "Colima started successfully."
|
||||
break
|
||||
else
|
||||
echo "Failed to start Colima. Attempt $i/$ATTEMPT_LIMIT."
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $i -gt $ATTEMPT_LIMIT ]; then
|
||||
echo "Failed to start Colima after $ATTEMPT_LIMIT attempts."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# For testcontainers to find the Colima socket
|
||||
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
|
||||
|
||||
Reference in New Issue
Block a user