agentleFS
jianjian12138jianjian12138/test-skills/skills/qa-ci/SKILL.md

qa-ci

Skill0 starsChanged 3 months agoMITView on GitHub

用于生成 CI/CD 流水线配置,让每次 push/PR 都自动运行 QA 测试套件 (lint + 单元测试 + 接口/UI/安全扫描)。本技能从一份配置 JSON 生成可直接提交的 GitHub Actions、GitLab CI、Jenkinsfile 配置,默认串起 lint → 单元 → 接口/UI → 安全扫描的质量门禁。触发词:"CI配置"、"流水线"、"GitHub Actions"、"GitLab CI"、 "Jenkins"、"把测试接进CI"。 英文触发词(English triggers):CI/CD, pipeline, GitHub Actions, Jenkins.

The file

Files
SKILL.md

qa-ci — CI/CD 流水线配置生成

把「测试接进流水线」这一步做成确定性生成:一份配置 JSON → GitHub Actions / GitLab CI / Jenkinsfile 三选一或全要。 默认串起 lint → 单元 → 接口/UI → 安全扫描,让你每次提交都跑质量门禁。

测试不进 CI,等于没测。先有流水线,质量才有持续保障。

何时使用

  • 要把测试套件接入持续集成。
  • 用户说「CI 配置」「流水线」「GitHub Actions」「GitLab CI」「Jenkins」「把测试接进 CI」。

操作流程

步骤 1 — 填配置

{"project":"order-svc","python_version":"3.13","providers":["github","gitlab"],
 "test_cmd":"pytest -q","lint_cmd":"flake8 .","security_cmd":"semgrep --config auto",
 "services":["postgres"],"branches":["main"]}

步骤 2 — 生成

python scripts/gen_ci.py --config ci.json --outdir ./ci_out

在 ci_out/ 生成对应文件( .github/workflows/qa.yml / .gitlab-ci.yml / Jenkinsfile), 含 install → lint → test → security 阶段,缺省失败即阻断合并。

步骤 3 — 接入

  • GitHub:提交 .github/workflows/qa.yml,PR 自动跑。
  • GitLab:提交 .gitlab-ci.yml,需共享 Runner。
  • Jenkins:用 Pipeline 导入 Jenkinsfile。

阶段约定

阶段做什么失败影响
install装依赖阻断
lint代码规范 / 静态检查阻断
test单元 + 接口/UI阻断
securitySemgrep / Trivy阻断(可设警告阈值)

与上下游衔接

  • 输入:各专项技能的可执行命令(qa-api-runner pytest、qa-security-scan semgrep/trivy)。
  • 输出:流水线文件 → 仓库提交;失败转 qa-bug-report。

参考资料

  • 检查项、阈值、CLI 用法与常见坑:见 references/guide.md。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.