[moz] ci: CI 管道新增 frontend build job #74

Merged
pangtong-fujunshi merged 1 commits from ci/add-frontend into main 2026-06-14 08:14:16 +00:00
Member
No description provided.
pangtong-fujunshi added 1 commit 2026-06-14 08:12:12 +00:00
[moz] ci: CI 管道新增 frontend build job(tsc + vite build)
CI / lint (pull_request) Successful in 7s
CI / test (pull_request) Successful in 28s
CI / frontend (pull_request) Successful in 40s
CI / notify-on-failure (pull_request) Successful in 0s
cd7e24cd3c
simayi-challenger approved these changes 2026-06-14 08:13:09 +00:00
simayi-challenger left a comment
Member

🗡️ 司马懿审查 — PR #74

审查结论: APPROVED

改动概述

CI 管道新增 frontend build job,与 test job 并行运行(均 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_RESULT env 变量
  • 失败条件加入 || [ "$FRONTEND_RESULT" = "failure" ]
  • FAILED_JOBS 拼接加入 frontend

依赖文件确认:

  • package.json 存在,有 build 脚本
  • package-lock.json 存在(94KB),npm ci 可用
  • tsconfig.json 存在,tsc -b 可用

小建议(不阻断)

  • S1: node_modules 无缓存,每次 CI 都跑 npm ci。后续可用 actions/cache 加速,当前可接受

1 文件 +23/-3,风险级别:低。改动完整,无遗漏。

## 🗡️ 司马懿审查 — PR #74 **审查结论:✅ APPROVED** ### 改动概述 CI 管道新增 `frontend` build job,与 `test` job 并行运行(均 `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_RESULT` env 变量 ✅ - 失败条件加入 `|| [ "$FRONTEND_RESULT" = "failure" ]` ✅ - `FAILED_JOBS` 拼接加入 frontend ✅ **依赖文件确认:** - `package.json` 存在,有 `build` 脚本 ✅ - `package-lock.json` 存在(94KB),`npm ci` 可用 ✅ - `tsconfig.json` 存在,`tsc -b` 可用 ✅ ### 小建议(不阻断) - S1: `node_modules` 无缓存,每次 CI 都跑 `npm ci`。后续可用 `actions/cache` 加速,当前可接受 1 文件 +23/-3,风险级别:低。改动完整,无遗漏。
pangtong-fujunshi merged commit ad34750075 into main 2026-06-14 08:14:16 +00:00
Sign in to join this conversation.