portal/skills/skill.testing.release.md
Haitao Pan 19d6641208 feat: add testing strategy skills and improve mobile navbar
Add testing strategy skills for PR/main/release gates with Node/TS & Go support.
Refactor mobile navigation order in Navbar.
Update chat label to AI Assistant/AI助手.
Fix vitest config setupFiles path resolution.
2026-01-30 12:13:56 +08:00

1.3 KiB
Raw Permalink Blame History

skillTesting Gate: release (Strict) v1

目标:“我跑过的就是我发的” 要求:最严门禁 + 可复现产物 + 端到端验证


A. Node/TS必跑

  1. 类型检查
  • Run: node:typecheck
  1. 静态分析
  • Run: node:lint
  1. 格式检查
  • Run: node:format:check
  1. 单元测试 + 覆盖率(可加门槛)
  • Run: node:test:cov
  • Coverage Gate建议按团队成熟度逐步提高
    • lines >= 70%(起步)
    • 或 diff coverage >= 80%
  1. API 集成测试(若为 API 项目)
  • Run: node:test:api
  • 要求:全量或覆盖关键路径 + 错误分支
  1. E2EPlaywright 全量)
  • Run: node:e2e
  1. 构建产物(必须保存)
  • Run: node:build
  • 要求:保存 artifactsdist/.next 等)

B. Go必跑

  1. 静态分析
  • Run: go:lint
  1. 单元测试Race 优先)
  • Run: go:test:race
  • 若环境不支持 race至少 go:test
  1. 覆盖率
  • Run: go:test:cov
  1. 安全扫描(必须)
  • Run: go:sec
  1. 构建产物(必须保存)
  • Run: go:build(或 docker build
  • 要求:保存 artifacts / 镜像 digest

C. Release Gate 输出要求

  • 必须输出:
    • 版本号 / commit sha
    • 覆盖率摘要
    • E2E 通过摘要
    • 构建产物指纹hash/digest
  • 任何失败 => 阻断发布