parent
4fc33cd88b
commit
507b93180a
@ -87,10 +87,16 @@ jobs:
|
||||
|
||||
- name: Wait for Live Server
|
||||
run: |
|
||||
for i in {1..10}; do # tries 10 times at 5-second intervals
|
||||
curl http://127.0.0.1:8081 && break
|
||||
echo "Waiting for live-server to be ready..."
|
||||
sleep 5
|
||||
attempts=0
|
||||
max_attempts=10
|
||||
while ! curl --output /dev/null --silent --head --fail http://127.0.0.1:8081; do
|
||||
if [ $attempts -eq $max_attempts ]; then
|
||||
echo "Live server not ready after $max_attempts attempts"
|
||||
exit 1
|
||||
fi
|
||||
attempts=$((attempts+1))
|
||||
echo "Waiting for live-server to be ready... attempt $attempts"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
- name: Test HTTP Request
|
||||
|
Loading…
x
Reference in New Issue
Block a user