#!/bin/bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" . "$SCRIPT_DIR/verify_common.sh" echo "=== Phase 5 验收检查 ===" check_file "Dockerfile" "Dockerfile 存在" check_file "docker-compose.yml" "docker-compose.yml 存在" check_file "nginx.conf" "Nginx 配置存在" check_file ".env.example" ".env.example 存在" check_file ".github/workflows/ci.yml" "GitHub Actions CI 配置存在" check_executable "scripts/backup.sh" "数据库备份脚本可执行" check_file "healthcheck.sh" "健康检查脚本存在" check_file "scripts/restore.sh" "数据库恢复脚本存在" check_shell "CI 包含 Go 测试" "grep -Eq 'go test .*\\./internal/|go test .*\\./\\.\\.\\.' .github/workflows/ci.yml" check_shell "CI 包含前端构建" "grep -q 'npm run build' .github/workflows/ci.yml" check_shell "CI 包含 Docker 构建" "grep -q 'docker build' .github/workflows/ci.yml" check_shell "CI 配置了覆盖率门禁" "grep -Eqi 'coverage|80%' .github/workflows/ci.yml" check_shell "CI 配置了构建产物上传" "grep -Eqi 'upload-artifact|artifacts' .github/workflows/ci.yml" check_shell "日志轮转配置已落地" "find . -maxdepth 3 -type f | grep -Eqi 'logrotate|logrotate\\.conf'" finish_phase