fix(ci): #916 improve check-frontend-only: pagination + infra detection + fix empty-line bug #926
Reference in New Issue
Block a user
Delete Branch "fix/ci-required-checks-coverage-916"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
调查结论
实际required check覆盖率远高于工单描述:8/9 的 required check 是始终运行的,只有 1 个测试类 check 是条件触发的(Unit Tests 或 Frontend Unit Tests)。
原因为 check-frontend-only 的判定逻辑存在 空行计数 bug(grep -cv 会把末尾空行算进去),导致
BACKEND_COUNT永远 >= 1,纯前端/纯后端的判定实际上从未生效,所有 PR 都是全量 CI。修复内容
1. 修复空行计数 bug
grep -cv "^apps/web/"会把末尾空行算作后端文件BACKEND_COUNT = TOTAL - FRONTEND_COUNT,其中 TOTAL 是非空行数2. 修复大 PR 漏判风险
3. 新增基础设施文件强制全量检测
infra/、Dockerfile、.gitea/workflows/、scripts/ci/、docker/的 PR,强制运行完整 CI关 #916
🚀 预览环境已部署
e7ae642ec5toba481f8ca7🗑️ 预览环境已清理
PR #926 已关闭或合并,对应的预览环境已被清理。