@ -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
|
||||
|
||||
Reference in New Issue
Block a user