Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

github-actions-testing

БесплатноБез исполняемых скриптовНе проверен

Expert guidance for testing and validating GitHub Actions workflows before deployment - catches cache errors, path issues, monorepo dependencies, and service…

pr-pmот pr-pm★ 125 звёзд на GitHub9 установок в других каталогах

Об этом скилле

SKILL: GitHub Actions Testing & Validation Expert

Description

Interactive expert for testing and validating GitHub Actions workflows before deployment. Prevents common CI failures by catching cache configuration errors, path issues, monorepo dependency problems, and service container configuration mistakes.

Capabilities

This skill provides:

  1. Pre-Push Validation: Complete workflow validation before pushing to GitHub
  2. Cache Configuration: Ensure cache-dependency-path is correctly specified
  3. Monorepo Build Order: Validate workspace dependency build sequences
  4. Service Container Setup: Guide proper service container configuration
  5. Path Validation: Verify all paths exist and are accessible
  6. Local Testing: Run workflows locally with act (Docker-based simulation)
  7. Static Analysis: Lint workflows with actionlint and yamllint

When to Use This Skill

Invoke this skill when:

  • Creating or modifying GitHub Actions workflows
  • Debugging workflow failures in CI
  • Setting up new repositories with CI/CD
  • Migrating to monorepo architecture
  • Adding service containers to workflows
  • Experiencing cache-related failures
  • Getting "module not found" errors in CI but not locally

Usage

Quick Validation

"Validate my GitHub Actions workflows before I push"

I'll:

  1. Run actionlint on all workflow files
  2. Check for missing cache-dependency-path configurations
  3. Validate all working-directory paths exist
  4. Verify monorepo build order is correct
  5. Check service container configurations
  6. Provide a pre-push checklist

Debugging Workflow Failures

"My GitHub Actions workflow is failing with [error message]"

I'll:

  1. Analyze the error message
  2. Identify the root cause
  3. Explain why local testing didn't catch it
  4. Provide the correct configuration
  5. Show how to test the fix locally

Setup New Repository

"Set up GitHub Actions testing for my new project"

I'll:

  1. Install required tools (act, actionlint, yamllint)
  2. Create validation scripts
  3. Set up pre-push hooks
  4. Configure recommended workflows
  5. Provide testing procedures

Critical Rules I Enforce

1. Cache Configuration

ALWAYS specify cache-dependency-path explicitly:

# ❌ WRONG
- uses: actions/setup-node@v4
  with:
    cache: 'npm'

# ✅ CORRECT
- uses: actions/setup-node@v4
  with:
    cache: 'npm'
    cache-dependency-path: package-lock.json

Why: GitHub Actions cache resolution fails silently in local testing but errors in CI with "Some specified paths were not resolved, unable to cache dependencies."

2. Monorepo Build Order

ALWAYS build workspace dependencies before type checking:

# ❌ WRONG
- run: npm ci
- run: npx tsc --noEmit

# ✅ CORRECT
- run: npm ci
- run: npm run build --workspace=@prpm/types
- run: npm run build --workspace=@prpm/registry-client
- run: npx tsc --noEmit

Why: TypeScript needs compiled output from workspace dependencies. Local development has pre-built artifacts, but CI starts clean.

3. npm ci in Monorepos

ALWAYS run npm ci from root, not workspace directories:

# ❌ WRONG
- working-directory: packages/infra
  run: npm ci

# ✅ CORRECT
- run: npm ci
- working-directory: packages/infra
  run: pulumi preview

Why: npm workspaces are managed from root. Workspace directories don't have their own package-lock.json.

4. Service Containers

Service containers can't override CMD via options:

# ❌ WRONG
services:
  minio:
    image: minio/minio:latest
    options: server /data  # Ignored!

# ✅ CORRECT
services:
  minio:
    image: minio/minio:latest

steps:
  - run: |
      docker exec $(docker ps -q --filter ancestor=minio/minio:latest) \
        sh -c "minio server /data &"

Why: GitHub Actions service containers ignore custom commands. They must be started manually in steps.

Validation Tools

Required Tools

# macOS
brew install act actionlint yamllint

# Linux
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
pip install yamllint

Validation Script

I'll create .github/scripts/validate-workflows.sh:

#!/bin/bash
set -e

echo "🔍 Validating GitHub Actions workflows..."

# 1. Static analysis
actionlint .github/workflows/*.yml
yamllint .github/workflows/*.yml

# 2. Cache configuration check
for file in .github/workflows/*.yml; do
    if grep -q "cache: 'npm'" "$file"; then
        if ! grep -A 2 "cache: 'npm'" "$file" | grep -q "cache-dependency-path"; then
            echo "❌ $file: Missing explicit cache-dependency-path"
            exit 1
        fi
    fi
done

# 3. Path validation
grep -r "working-directory:" .github/workflows/*.yml | while read -r line; do
    dir=$(echo "$line" | sed 's/.*working-directory: //' | tr -d '"')
    if [ ! -d "$dir" ]; then
        echo "❌ Directory does not exist: $dir"
Полный SKILL.md на GitHub

Установить github-actions-testing в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл github-actions-testing?

Expert guidance for testing and validating GitHub Actions workflows before deployment - catches cache errors, path issues, monorepo dependencies, and service container problems that local testing misses

Как установить скилл github-actions-testing?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл github-actions-testing запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить github-actions-testing с