fix: CI health check 使用 bun fetch 替代 curl
Some checks failed
CI/CD Pipeline / Code Quality (push) Successful in 15s
CI/CD Pipeline / Unit Tests (push) Successful in 9s
CI/CD Pipeline / Build & Deploy Test (push) Has been skipped
CI/CD Pipeline / Build & Deploy Production (push) Failing after 48s

runner 镜像 duoqi-runner:bun-git 未安装 curl,
改用 bun 内置 fetch API 做 HTTP 健康检查。
This commit is contained in:
Wang Zhuoxuan 2026-04-18 03:11:35 +08:00
parent 23f8c16c54
commit e076c3be19

View File

@ -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