跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

ci-cd-integration

Design CI/CD pipelines that run test suites. Covers GitHub Actions and GitLab CI templates, parallelism and sharding, artifact management, flaky-test quarantine, test-result publishing, coverage quality gates, OIDC keyless deploy, and copy-paste workflows for Playwright, Jest, and multi-stage pipelines. Use when: "CI/CD," "GitHub Actions," "pipeline," "test in CI," "GitLab CI," "continuous integration," "test automation pipeline," "shard tests in CI." Not for: per-test flaky healing at runtime — use test-reliability; go/no-go release decisions and smoke-test checklists — use release-readiness; test-result dashboards and trend reporting — use qa-metrics. Related: playwright-automation, qa-metrics, test-reliability, coverage-analysis, release-readiness.

petrkindlmann · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add petrkindlmann/qa-skills --skill ci-cd-integration

技能说明


name: ci-cd-integration description: >- Design CI/CD pipelines that run test suites. Covers GitHub Actions and GitLab CI templates, parallelism and sharding, artifact management, flaky-test quarantine, test-result publishing, coverage quality gates, OIDC keyless deploy, and copy-paste workflows for Playwright, Jest, and multi-stage pipelines. Use when: "CI/CD," "GitHub Actions," "pipeline," "test in CI," "GitLab CI," "continuous integration," "test automation pipeline," "shard tests in CI." Not for: per-test flaky healing at runtime — use test-reliability; go/no-go release decisions and smoke-test checklists — use release-readiness; test-result dashboards and trend reporting — use qa-metrics. Related: playwright-automation, qa-metrics, test-reliability, coverage-analysis, release-readiness. license: MIT metadata: author: kindlmann version: "2.0" category: infrastructure

Discovery Questions

Check .agents/qa-project-context.md first — if it exists, use it and skip anything already answered there (especially team_maturity and existing CI conventions). Then:

  1. Which CI platform? GitHub Actions, GitLab CI, CircleCI, Jenkins? This skill ships templates for GitHub Actions and GitLab CI.
  2. What test types need to run? Unit, integration, E2E, visual, performance? Each has different resource and timing needs.
  3. What is the current CI duration? Over 10 minutes means parallelism and sharding are mandatory, not optional.
  4. How many developers push per day? High-frequency teams need aggressive concurrency cancellation and caching.
  5. What triggers should run which tests? Not every push needs a full E2E suite — map triggers to suites before writing YAML.

Calibrate to team maturity

Set team_maturity in .agents/qa-project-context.md; pick the matching pipeline shape:

  • startup — one job: lint + unit + one E2E smoke on PR. Fast feedback over completeness.
  • growing — separate jobs for unit, integration, E2E. Parallelization, artifact uploads, result publishing, flaky quarantine.
  • established — full matrix: sharded E2E, multi-environment promotion gates, perf and security scans, deploy-gated checks, SLA-backed pipelines.

Core Principles

  1. Fast feedback: right tests at the right time. Unit tests on every push (under 2 min). E2E on PRs (under 10 min). Full suite on merge and nightly. The trigger-to-suite map below is the contract.
  2. Parallel first: shard tests across workers. A 20-minute serial suite becomes 5 minutes across 4 shards. Always worth the runner cost.
  3. Artifacts are evidence. Every run stores traces, screenshots, coverage, and HTML reports. Without artifacts, a CI failure is an undebuggable "reproduce locally" cycle.
  4. Flaky tests need quarantine, not retries. Retrying hides the problem — the test passes on retry, the report is green, the race condition persists. Move flaky tests to a non-blocking job, track them, fix the root cause.
  5. Quality gates get stricter toward production. Define what must pass at each stage; PR gate is fast and cheap, deploy gate is comprehensive.
  6. Read thresholds from config, not from bash. Let the test runner enforce coverage via its own coverageThreshold/thresholds and exit non-zero. Scraping percentages out of stdout with regex is fragile across runner versions.

Pipeline Architecture

Push to branch:   lint+types (30s) → unit (1-2m)
PR opened:        + integration (2-3m) → E2E sharded (5-8m) → merge report
Merge to main:    full E2E ∥ visual ∥ perf budget → deploy (OIDC)
Nightly (cron):   full suite + npm audit + axe a11y + flaky quarantine

What runs when

TriggerTestsMax duration
Push to branchlint, type-check, unit2 min
PR opened/updated+ integration, E2E smoke10 min
Merge to main+ full E2E, visual, perf budget15 min
Nightly schedulefull suite, security, a11y, flaky quarantine30 min
Release tagfull suite, smoke against staging20 min

GitHub Actions

For complete copy-paste workflow files (unit, sharded Playwright E2E, full pipeline, nightly, PR gate), see references/github-actions-templates.md.

Action versions (June 2026)

Pin to the current major and let Dependabot bump them. The actions/* family runs on the Node 24 runner; Node 20 is deprecated on GH-hosted runners.

ActionCurrent majorNotes
actions/checkout@v6
actions/setup-node@v6v5+ auto-caches only when packageManager is set; use cache: npm to be explicit
actions/cache@v5new cache service v2 backend
actions/upload-artifact@v7v7 can upload unzipped (archive: false)
actions/download-artifact@v7pair with upload-artifact major
dorny/test-reporter@v3v3 requires Node 24 runner; reporter keys unchanged
dorny/paths-filter@v3
marocchino/sticky-pull-request-comment@v3
slackapi/slack-github-action@v2floating major; see notification note before adopting v3

For supply-chain-sensitive pipelines, pin third-party actions (dorny, marocchino, slackapi, knapsack) to a full-length commit SHA with a version comment, and let Dependabot update the SHA: uses: dorny/test-reporter@<40-char-sha> # v3.0.0. First-party actions/* are lower risk; tags are acceptable there.

Key concepts

阅读完整来源 ↗