mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
ci: fail fast when a server never comes up
the readiness loops fell through silently after 30 tries, so a server that never started surfaced as an opaque driver failure minutes later. each now says what did not answer and on which port.
This commit is contained in:
1 parent
7c845ff498
commit
9a05add30c
2 files changed
+18
-3
No files matched your search
@@ -64,10 +64,15 @@ http.server.HTTPServer(("127.0.0.1", port), handler).serve_forever()
|
||||
PY
|
||||
server_pid=$!
|
||||
trap 'kill "$server_pid" 2>/dev/null' EXIT
|
||||
ready=""
|
||||
for _ in $(seq 1 30); do
|
||||
curl -sf "http://127.0.0.1:$port/index.html" >/dev/null && break
|
||||
curl -sf "http://127.0.0.1:$port/index.html" >/dev/null && { ready=1; break; }
|
||||
sleep 1
|
||||
done
|
||||
if [ -z "$ready" ]; then
|
||||
echo "folio/web: the app server never served index.html on 127.0.0.1:$port from $dist" >&2
|
||||
exit 1
|
||||
fi
|
||||
folio_args=(--platform web --bundle-id "http://127.0.0.1:$port/index.html")
|
||||
;;
|
||||
*)
|
||||
|
||||
Reference in new issue
Block a user