| name | qa-ci |
| description | Wire the QA suite into CI. Use when the user wants tests running automatically on every PR or on a schedule: "add this to CI", "run tests on every push", "/qa-ci". Generates GitHub Actions workflows for the generated Playwright suite and (optionally) scheduled full audits.
|
QA CI — Continuous Testing Setup
Two tiers. Always offer tier 1; tier 2 only if the user wants scheduled
AI audits (it consumes Claude API credits in CI).
Tier 1 — Test suite on every PR (no AI, free to run)
Generate .github/workflows/qa-tests.yml:
- Triggers:
pull_request + push to main.
- Steps: checkout → setup-node (npm cache) →
npm ci →
npx playwright install --with-deps chromium → npx playwright test.
- On failure: upload
playwright-report/ and traces as artifacts.
- If the app needs a DB, add a
services: block (postgres/mysql) matching
what qa-profile.md says the app uses.
- Detect the package manager (npm/pnpm/yarn/bun) from lockfiles — don't
assume npm.
The regression tests generated from audit findings run here too — every bug
ever found stays guarded on every PR, no AI involved.
Tier 2 — Scheduled AI audit (optional, uses API credits)
Generate .github/workflows/qa-audit-scheduled.yml:
- Trigger:
schedule: cron (ask cadence; default weekly) + manual
workflow_dispatch.
- Uses
anthropics/claude-code-action with prompt /qa-audit, requires
ANTHROPIC_API_KEY as a repo secret — tell the user exactly where to add
it (Settings → Secrets and variables → Actions). Never write a key into
any file.
- After the audit: commit the new
qa-reports/runs/<timestamp>/ folder to a
qa-reports branch (not main) or upload as artifact — user's choice.
- Mention
/qa-trend reads those runs to chart improvement over time.
Verify
- Validate YAML locally (
npx yaml-lint or python yaml.safe_load).
- If
gh CLI is available and the user agrees: push a branch and confirm the
workflow triggers. Otherwise tell the user the file paths and that the
workflow activates on next push.
Final response
- Files created + what triggers what.
- Secrets the user must add (names only) and where.
- One-line cost note for tier 2.