harness/plugins/ci-github/claude/skills/act-local-github-actions-testing/SKILL.md
Run and debug GitHub Actions locally with `act`, including job filtering, secrets injection, event payload simulation, reusable workflow checks, and pl-repo-specific constraints.
npx skillsauth add popoffvg/dotfiles act-local-github-actions-testingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run GitHub Actions workflows locally with act to validate workflow logic before pushing.
Use this skill when you need to:
.github/workflows/*.y*ml changes quicklyif, matrix, needs, concurrency, and reusable-workflow wiring--job).--eventpath).# List workflows/jobs as seen by act
act --list
# Run pull_request event
act pull_request
# Run only one job
act pull_request -j lint
# Run manual dispatch workflow
act workflow_dispatch -W .github/workflows/trigger-commit-pr.yaml
# Use explicit event payload
act pull_request --eventpath .github/events/pr.json
# Provide secrets
act pull_request -s GITHUB_TOKEN=ghp_xxx -s GH_CI_PAT=xxx
# Use env file / vars
act pull_request --env-file .env.act
-j <job>) instead of whole workflow..env.act or secret files.These are specific to mil/pl workflows and should be applied when testing that repo locally.
pl workflows include many jobs that depend on private actions, cloud auth, or self-hosted runners.
Start from low-coupling jobs:
lint reusable workflow chainactionlint job in .github/workflows/lint.yamlAvoid running full trigger-commit-pr.yaml in one shot initially.
pl uses runners like dev-ci-pl, rockylinux8-amd64, etc. Local act won’t replicate those exactly.
Use local smoke checks for logic/syntax; treat environment-specific behavior as needs-verification in CI.
pl heavily uses:
milaboratory/github-ci/actions/*milaboratory/github-ci-internal/actions/*Local act may fail pulling these without org access/token.
Recommended approach:
Common secrets referenced in workflows:
MI_LICENSEGH_CI_PATAWS_CI_TURBOREPO_S3_BUCKETNPMJS_TOKENQUAY_USERNAMEQUAY_ROBOT_TOKENCOUCHDB_*Use placeholder/local test secrets where possible; do not use production creds.
pl composes workflows via workflow_call and secrets: inherit (for example: trigger-commit-pr.yaml calls lint.yaml, build-multiplatform.yaml, test.yaml).
Local strategy:
needs, conditions, dispatch inputs).trigger-commit-pr.yaml has workflow_dispatch with deploy-staging boolean.
Use explicit dispatch payloads when testing dispatch-only branches:
deploy-staging=false firsttrue only if secrets/mocks are preparedpl uses concurrency groups and event-specific conditions (github.event_name, github.ref, PR-only comments).
Always test at least:
lint.yaml -> actionlint job onlytrigger-commit-pr.yaml PR event with deploy-staging=falsetrigger-commit-pr.yaml workflow_dispatch with deploy-staging=false.github/workflows changed files identified-s or --secret-file entry.A local act verification is complete when:
testing
Use when the user asks to create test sets, enumerate scenarios, generate edge cases, or draft a coverage matrix before implementation.
testing
Use when the user asks to review, audit, score, or validate test sets for missed cases before execution or merge.
tools
Test harness plugins in isolation using tmux panes. Runs MCP servers, unit tests, typecheck, and Claude plugin loading. Use when user says "test plugin", "check plugin", "run plugin tests", "validate plugin", or names a specific plugin to test.
development
Guide for designing integration and e2e tests using BDD (Behavior-Driven Development) methodology with Cucumber-style Given/When/Then scenarios. Use when writing or reviewing tests for any service, API, or component. Language-agnostic — covers scenario structure, step notation, assertion principles, async patterns, and common anti-patterns.