Skip to content

Commit ca5c5a2

Browse files
committed
fix(JJF1Y39): fix CI step under set -euo pipefail (F1/F2/F3)
1 parent 7c1b039 commit ca5c5a2

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

‎.github/workflows/verify.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ jobs:
3030
set -euo pipefail
3131
python3 collector/speculum.py --port 18792 &
3232
pid=$!
33+
trap 'kill "$pid" 2>/dev/null || true' EXIT
3334
for i in $(seq 1 20); do
3435
curl -sf http://127.0.0.1:18792/api/snapshot >/dev/null && break
3536
sleep 0.5
3637
done
37-
curl -sf http://127.0.0.1:18792/api/snapshot | python3 -m json.tool | head
38-
curl -sN -m 2 http://127.0.0.1:18792/api/stream | head
39-
kill "$pid"
38+
curl -sf http://127.0.0.1:18792/api/snapshot | python3 -m json.tool
39+
tmp=$(mktemp)
40+
timeout 2 curl -sN http://127.0.0.1:18792/api/stream > "$tmp" || true
41+
head -n 2 "$tmp"
42+
rm -f "$tmp"
4043
4144
windows:
4245
runs-on: windows-latest

0 commit comments

Comments
 (0)