ci: 全量加固6项 - 新增文件全量检查/缓存完整性校验/脚本语法自检/每日全量CI/integration重试
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 32s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 35s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 50s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m17s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 58s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 2m5s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m55s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m16s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 2m44s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m6s
AI Code Review / AI Code Review (pull_request) Successful in 3m52s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m39s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 7m56s
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1338h45m15s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1338h45m17s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 1338h45m25s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1338h45m19s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1338h46m3s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1338h45m21s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1338h46m7s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1338h46m9s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1338h46m43s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1338h46m43s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1339h18m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1339h17m40s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1339h18m22s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 32s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 35s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 50s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m17s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 58s
CI/CD Pipeline / Validate - Code Quality (pull_request) Successful in 2m5s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m55s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 3m16s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 2m44s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 3m6s
AI Code Review / AI Code Review (pull_request) Successful in 3m52s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 4m39s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 7m56s
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1338h45m15s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1338h45m17s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 1338h45m25s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1338h45m19s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1338h46m3s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1338h45m21s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1338h46m7s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1338h46m9s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1338h46m43s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1338h46m43s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1339h18m59s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1339h17m40s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1339h18m22s
This commit is contained in:
@@ -79,6 +79,25 @@ try:
|
||||
print(' '.join(py_files))
|
||||
except Exception:
|
||||
print('')
|
||||
")
|
||||
# 新增文件(added)强制全量检查,防止增量漏检
|
||||
ADDED_PY_FILES=$(echo "$BODY" | python3 -c "
|
||||
import json, sys
|
||||
try:
|
||||
files = json.load(sys.stdin)
|
||||
added = [f['filename'] for f in files if f['filename'].endswith('.py') and f['status'] == 'added']
|
||||
print(' '.join(added))
|
||||
except Exception:
|
||||
print('')
|
||||
")
|
||||
MODIFIED_PY_FILES=$(echo "$BODY" | python3 -c "
|
||||
import json, sys
|
||||
try:
|
||||
files = json.load(sys.stdin)
|
||||
modified = [f['filename'] for f in files if f['filename'].endswith('.py') and f['status'] not in ('removed', 'added')]
|
||||
print(' '.join(modified))
|
||||
except Exception:
|
||||
print('')
|
||||
")
|
||||
if [ -n "$CHANGED_PY_FILES" ]; then
|
||||
SCAN_MODE="incremental"
|
||||
@@ -174,13 +193,42 @@ echo "发现潜在死代码(可能包含框架装饰器注册的函数,为
|
||||
echo "建议:定期人工审查高置信度(>=90%)条目"
|
||||
set -e
|
||||
|
||||
# --- Release 脚本语法校验 ---
|
||||
# --- CI脚本语法校验 ---
|
||||
echo ""
|
||||
echo "=== [6/6] Release scripts syntax validation ==="
|
||||
bash -n scripts/backup_postgres.sh
|
||||
bash -n scripts/restore_postgres_plan.sh
|
||||
bash -n scripts/init_production_env.sh
|
||||
echo "✅ Release scripts syntax OK"
|
||||
echo "=== [6/6] CI & shell scripts syntax validation ==="
|
||||
SYNTAX_ERROR=0
|
||||
# 检查所有 CI shell 脚本
|
||||
for script in scripts/ci/*.sh; do
|
||||
if [ -f "$script" ]; then
|
||||
if ! bash -n "$script" 2>&1; then
|
||||
echo "❌ 语法错误: $script"
|
||||
SYNTAX_ERROR=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# 检查所有 CI Python 脚本语法
|
||||
for script in scripts/ci/*.py; do
|
||||
if [ -f "$script" ]; then
|
||||
if ! python3 -m py_compile "$script" 2>&1; then
|
||||
echo "❌ Python语法错误: $script"
|
||||
SYNTAX_ERROR=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
# 检查 .gitea/workflows 下的脚本(如果有)
|
||||
for script in .gitea/workflows/*.sh; do
|
||||
if [ -f "$script" ]; then
|
||||
if ! bash -n "$script" 2>&1; then
|
||||
echo "❌ 语法错误: $script"
|
||||
SYNTAX_ERROR=1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ "$SYNTAX_ERROR" -ne 0 ]; then
|
||||
echo "❌ CI脚本语法校验失败,见上方错误"
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ All CI scripts syntax OK"
|
||||
|
||||
echo ""
|
||||
echo "=== CI Validate: 代码质量与安全扫描 全部通过 ✅ ==="
|
||||
|
||||
Reference in New Issue
Block a user