CI: save the page before grepping it in the server smoke test (no flaky pipefail)

This commit is contained in:
sganggs committed 2026-10-02 16:18:33 +08:00
1 parent a1b1b1ae51
commit b59aa15ee2
1 file changed
+4 -1
+4 -1
View File
@@ -61,7 +61,10 @@ jobs:
done done
echo echo
[ -n "$ok" ] || { cat server.log; exit 1; } [ -n "$ok" ] || { cat server.log; exit 1; }
curl -fsS http://127.0.0.1:3000/ | grep -qi '<html' # Save the page first: piping curl into `grep -q` let grep exit on the first match, curl then failed with a
# write error (23) and pipefail turned that into a flaky red step.
curl -fsS -o index.out http://127.0.0.1:3000/
grep -qi '<html' index.out
curl -fsS -o /dev/null http://127.0.0.1:3000/vendor/pixi.min.js curl -fsS -o /dev/null http://127.0.0.1:3000/vendor/pixi.min.js
node tools/doctor.mjs || true node tools/doctor.mjs || true
kill $pid || true kill $pid || true