zxc
Some checks failed
简单测试 / test (push) Failing after 1m25s

This commit is contained in:
2025-07-12 15:30:36 +08:00
parent 7263dc4747
commit 2e117b3786

View File

@ -135,18 +135,18 @@ jobs:
IMAGE_TAG="latest"
# 运行镜像进行测试
docker run -d --name test-container -p 3000:3000 "$IMAGE_NAME:$IMAGE_TAG"
docker run -d --name test-container -p 3901:3000 "$IMAGE_NAME:$IMAGE_TAG"
# 等待容器启动
sleep 5
# 测试健康检查
echo "🔍 测试应用健康状态..."
curl -f http://localhost:3000/health || exit 1
curl -f http://192.168.1.200:3901/health || exit 1
# 测试主页
echo "🔍 测试应用主页..."
curl -f http://localhost:3000/ || exit 1
curl -f http://192.168.1.200:3901/ || exit 1
# 停止并删除测试容器
docker stop test-container