Test Automation CI/CD
> **Skill Purpose:** Automate test execution in CI/CD pipelines with reliable gating, artifacts, and reporting.
SKILL.md
Full skill instructions
Test Automation CI/CD
Skill Purpose: Automate test execution in CI/CD pipelines with reliable gating, artifacts, and reporting.
Core Skill Pattern
Objective: Ensure every change runs the right tests with deterministic outcomes and clear reporting.
Universal Pattern:
- Define test stages (unit, integration, E2E)
- Configure pipeline steps with caching
- Run tests in parallel where possible
- Publish reports and artifacts
- Enforce quality gates on failures
Key Decisions (Project-Specific):
- CI provider and runner image
- Split between jobs vs single job
- Required checks for merge
- Flaky test quarantine policy
Project-Specific Implementation Notes
Customize per project:
- Use test containers when needed
- Separate smoke tests for quick feedback
- Archive coverage and test reports
Example Implementation (GitHub Actions)
name: tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run test:unit
- run: npm run test:integration
- run: npm run test:e2e
- uses: actions/upload-artifact@v4
with:
name: test-reports
path: reports/
Best Practices
- Keep unit tests fast and first
- Use retries only for known flaky tests
- Fail fast on setup errors
- Publish artifacts for debugging
- Gate merges on required checks
Stop Conditions
STOP and escalate if:
- CI pipeline is unstable or flaky
- Required checks are not enforced
- Artifacts are not captured for failures
Skill Version: 1.0.0
