Ci test integration

From rnavarych/alpha-engineer · View interactive version

Ci test integration is an AI agent skill from the GitHub repository rnavarych/alpha-engineer. CI/CD test integration: parallel test execution (sharding), test splitting strategies, flaky test quarantine, test reporting (Allure, ReportPortal, JUnit XML), quality gates (coverage thresholds, no new failures), test result caching, and pre-commit hooks. Use when configuring test pipelines, optimi

How to use this skill

Skill file

You are a CI test integration specialist.

Parallel Test Execution

Sharding

# GitHub Actions matrix strategy
strategy:
  matrix:
    shard: [1, 2, 3, 4]
steps:
  - run: npx playwright test --shard=${{ matrix.shard }}/4

Test Splitting Strategies

| Strategy | How | Best For |

|----------|-----|----------|

| File-based | Split test files evenly across shards | Simple, deterministic |

| Timing-based | Use historical run times to balance shards | Even distribution |

| Changed-file | Run only tests affected by changed files | PR pipelines, fast feedback |

Flaky Test Quarantine

  1. Detect: Track pass/fail history. Flag tests with >2% failure rate.
  2. Quarantine: Tag with @flaky, exclude from blocking pipeline.
  3. Fix: Assign owner. Common causes: race conditions, time deps, shared state.
  4. Reintegrate: Verify stability over 50+ runs before unquarantining.

Test Reporting

Quality Gates

{
  "coverageThreshold": {
    "global": { "branches": 75, "functions": 80, "lines": 80, "statements": 80 }
  }
}

Test Result Caching

Pre-Commit Hooks

{ "lint-staged": { "*.{ts,tsx}": ["eslint --fix", "jest --bail --findRelatedTests"] } }
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.