Fixed waiting.

This commit is contained in:
SamTV12345 2024-03-10 21:50:45 +01:00
parent 6985c216d2
commit 78ae34ea15

View file

@ -123,8 +123,16 @@ jobs:
shell: bash
run: |
pnpm run dev &
log "Waiting for Etherpad to accept connections (http://localhost:9001)..."
sleep 20
connected=false
can_connect() {
curl -sSfo /dev/null http://localhost:9001/ || return 1
connected=true
}
now() { date +%s; }
start=$(now)
while [ $(($(now) - $start)) -le 15 ] && ! can_connect; do
sleep 1
done
cd src
pnpm exec playwright install
pnpm run test-admin