[moz] ci: CI 管道新增 frontend build job #74
Reference in New Issue
Block a user
Delete Branch "ci/add-frontend"
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?
🗡️ 司马懿审查 — PR #74
审查结论:✅ APPROVED
改动概述
CI 管道新增
frontendbuild job,与testjob 并行运行(均needs: lint),notify-on-failure同步更新覆盖 frontend。逐项审查
frontend job(新增):
needs: lint— 与 test 并行,不重复跑 ✅actions/setup-node@v4+node-version: 20— Vite 5 兼容 ✅npm ci || npm install— lockfile 存在用 ci,否则降级 install ✅npm run build=tsc -b && vite build— 类型检查 + 打包 ✅runs-on: macos-arm64— 与其他 job 一致 ✅notify-on-failure 更新:
needs: [lint, test, frontend]✅FRONTEND_RESULTenv 变量 ✅|| [ "$FRONTEND_RESULT" = "failure" ]✅FAILED_JOBS拼接加入 frontend ✅依赖文件确认:
package.json存在,有build脚本 ✅package-lock.json存在(94KB),npm ci可用 ✅tsconfig.json存在,tsc -b可用 ✅小建议(不阻断)
node_modules无缓存,每次 CI 都跑npm ci。后续可用actions/cache加速,当前可接受1 文件 +23/-3,风险级别:低。改动完整,无遗漏。