github-actions-test-jobs
БесплатноБез исполняемых скриптовНе проверенUse whenever the task is to run tests in GitHub Actions: a test workflow on pull requests, matrix builds across OS and runtime versions, splitting a suite…
от testland★ 18 звёзд на GitHubОб этом скилле
github-actions-test-jobs
Overview
Test workflows are YAML files in .github/workflows/ that run jobs on
trigger events (gha). This skill sets up the idiomatic patterns -
matrix builds, sharding, service containers, JUnit reporting, trigger
filtering, concurrency, and secrets. Start with the minimal pattern in
Step 1.
When to use
- Project on GitHub.
- Need to set up test CI for a new repo.
- Existing GitHub Actions workflows need standardization.
How to use
- Add
.github/workflows/test.ymltriggered onpull_requestand push tomain; check out the repo and set up the runtime (Step 1). - Install dependencies and run the suite (
npm cithennpm test). - Add a build matrix over OS and runtime versions with
fail-fast: falsefor multi-target signal (Step 2), and shard large suites across parallel jobs (Step 3). - Wire any service containers the tests need and emit JUnit XML,
uploading it with
if: always()- references/services-and-reporting.md. - Filter triggers by path and add
schedule/workflow_dispatch(Step 7); add aconcurrencygroup so superseded pushes cancel (Step 8). - Move tokens into
secrets.*and reference them from stepenv(Step 9). - Verify the workflow runs (see Verify below), then review the anti-patterns table before merging.
Step 1 - Basic test workflow
# .github/workflows/test.yml
name: test
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with: { node-version: '24' }
- run: npm ci
- run: npm test
The minimal pattern: trigger on PR + push-to-main, install deps, run tests.
Step 2 - Matrix builds
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [22, 24]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with: { node-version: ${{ matrix.node }} }
- run: npm ci
- run: npm test
Per workflow syntax, when fail-fast is true GitHub "will
cancel all in-progress and queued jobs in the matrix if any job in the
matrix fails", and "This property defaults to true". Set it to false
explicitly so every OS and runtime reports. Matrix size is OS × Node =
3 × 2 = 6 jobs; per limits, "A job matrix can generate a
maximum of 256 jobs per workflow run."
To let one experimental target fail without cancelling the rest, mark
it with continue-on-error: ${{ matrix.experimental }}, which per
workflow syntax "applies to a single job".
Runner pinning, per-language runtime matrices (Node / Python / Java / .NET), OS-specific quirks (path separators, line endings, case sensitivity, shells), per-OS conditional steps and tests, and the tiered cost-management cadence are in references/os-matrix.md.
Step 3 - Sharding for parallel execution
For large suites:
jobs:
test:
strategy:
matrix:
shard: [1, 2, 3, 4]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- run: npx jest --shard=${{ matrix.shard }}/4
4 parallel jobs, each running 1/4 of the test suite. Per
jest-cli, --shard takes shardIndex/shardCount, both
"1-based, positive numbers". Wall-clock time drops; billed minutes stay
about the same plus each job's setup time. Playwright (--shard=1/4)
and pytest-xdist splitting follow the same matrix shape.
Service containers and reporting
Wiring the service containers the tests depend on (PostgreSQL, Redis) and publishing JUnit XML as artifacts plus PR-check summaries are in references/services-and-reporting.md.
Step 6 - Retry policy
GitHub Actions doesn't ship native test-retry; use the framework's
retry mechanism (e.g., Playwright's retries config) or a wrapper
action such as nick-fields/retry, which takes
timeout_minutes (or timeout_seconds), max_attempts and command:
- uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 2
command: npm test
Use sparingly - retries hide flake. Prefer
flaky-test-quarantine (in the qa-flake-t
Установить github-actions-test-jobs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл github-actions-test-jobs?
Use whenever the task is to run tests in GitHub Actions: a test workflow on pull requests, matrix builds across OS and runtime versions, splitting a suite across parallel runners, service containers such as Postgres or Redis, uploading JUnit reports, and trigger filters.
Как установить скилл github-actions-test-jobs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл github-actions-test-jobs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic