fix: CI health check 使用 bun fetch 替代 curl
runner 镜像 duoqi-runner:bun-git 未安装 curl, 改用 bun 内置 fetch API 做 HTTP 健康检查。
This commit is contained in:
parent
23f8c16c54
commit
e076c3be19
@ -69,7 +69,7 @@ jobs:
|
||||
run: |
|
||||
sleep 10
|
||||
for i in {1..5}; do
|
||||
if curl -f http://localhost:3001/health; then
|
||||
if bun -e "fetch('http://localhost:3001/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))"; then
|
||||
echo "Test environment is healthy!"
|
||||
exit 0
|
||||
fi
|
||||
@ -107,7 +107,7 @@ jobs:
|
||||
run: |
|
||||
sleep 15
|
||||
for i in {1..5}; do
|
||||
if curl -f http://localhost:3000/health; then
|
||||
if bun -e "fetch('http://localhost:3000/health').then(r=>r.ok?process.exit(0):process.exit(1)).catch(()=>process.exit(1))"; then
|
||||
echo "Production deployment successful!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Loading…
Reference in New Issue
Block a user