From 74ceb8d17fb078a2eeab5af58d4cf8e6eab3ed04 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Wed, 15 Jul 2026 11:27:43 +0800 Subject: [PATCH] =?UTF-8?q?perf(ci):=20mypy=E5=A2=9E=E9=87=8F=E6=89=AB?= =?UTF-8?q?=E6=8F=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index 520296165..307db03a6 100755 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -103,7 +103,7 @@ jobs: - name: Type check (mypy, advisory mode) if: always() shell: sh - run: "set +e\necho \"=== Installing mypy ===\"\npython3 -m pip install -q mypy\nmypy --version\necho \"\"\necho \"=== Running mypy type check (advisory mode) ===\"\necho \"告警模式,不阻断CI\"\necho \"\"\n# 只检查核心业务代码,跳过测试和迁移\nEXIT_CODE=0\nmypy apps/api/app packages --ignore-missing-imports --no-site-packages --no-strict-optional --explicit-package-bases --exclude 'tests/|test_|migrations/|alembic/' --no-error-summary 2>&1 | head -60 || EXIT_CODE=$?\necho \"\"\nif [ \"$EXIT_CODE\" != \"0\" ]; then\n echo \"mypy 发现类型问题(告警模式,不阻断)\"\n echo \"建议后续逐步修复\"\nelse\n echo \"mypy 类型检查通过 ✅\"\nfi\nexit 0\n" + run: "bash scripts/ci/mypy_check.sh" - name: Run security scan (bandit) shell: sh run: 'set -eu