xarchitecture
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Local GitHub Actions testing with nektos/act for rapid development feedback
How it fires
How this command gets triggered: by you, by Claude, or both.
/xactContext preview
What this command does when you run it.
Local GitHub Actions testing with nektos/act for rapid development feedback
description: Local GitHub Actions testing with nektos/act for rapid development feedback tags: [github-actions, local-testing, development, act, docker, automation, macos]
Test GitHub Actions workflows locally using nektos/act for fast feedback during development, before pushing to GitHub.
/xact # Auto-discover and run all workflows /xact --workflow ci.yml # Run specific workflow file /xact --job test # Run specific job only /xact --list # List available workflows /xact --install-deps # Install nektos/act and Docker /xact --check-deps # Check dependency status /xact --simulate # Run in simulation mode /xact --dry-run # Preview execution without running /xact --start-docker # Start Docker daemon (macOS)
**`--workflow <file>`** - Run specific workflow file
/xact --workflow .github/workflows/ci.yml /xact --workflow tests.yml
**`--job <name>`** - Execute specific job only
/xact --job test /xact --job build /xact --job security-scan
**`--list`** - List all available workflows
/xact --list # Show discoverable workflows
**`--install-deps`** - Install nektos/act and Docker
/xact --install-deps # Auto-install dependencies
**`--check-deps`** - Verify dependency availability
/xact --check-deps # Check act and Docker status
**`--start-docker`** - Start Docker daemon (macOS-specific)
/xact --start-docker # Launch Docker Desktop on macOS
**`--simulate`** - Run in fallback simulation mode
/xact --simulate # Simulate when Docker unavailable
**`--dry-run`** - Preview without execution
/xact --dry-run # Show what would be executed
Based on $ARGUMENTS, perform local GitHub Actions testing operations:
First, check project structure and workflow availability: !find .github/workflows -name "*.yml" -o -name "*.yaml" 2>/dev/null | head -10 !ls -la .github/workflows/ 2>/dev/null || echo "No GitHub Actions workflows found"
Create enhanced Act runner script following your specifications:
!cat > scripts/xact.sh << 'EOF' #!/bin/bash set -euo pipefail
BLUE='\033[0;34m' GREEN='\033[0;32m' YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m' # No Color
PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" TIMEOUT_SECONDS=600 ACT_CONFIG_FILE="${PROJECT_ROOT}/.actrc" ARTIFACT_PATH="/tmp/act-artifacts"
workflow_names=() workflow_statuses=()
log() { echo "[$(date '+%Y-%m-%d %H:%M:%S')] $*" >&2 }
add_workflow_result() { local name="$1" local status="$2" workflow_names+=("$name") workflow_statuses+=("$status") }
show_help() { echo -e "${BLUE}๐ฌ Enhanced Act GitHub Actions Runner${NC}" echo "======================================" echo "" cat << HELP_EOF USAGE: ./scripts/xact.sh [OPTIONS] [WORKFLOW_FILE]
OPTIONS: --help Show this help message --check-docker Check Docker availability --simulate Run in fallback simulation mode --list List available workflows --job JOB_NAME Run specific job --install-deps Install nektos/act and Docker dependencies --check-deps Check for missing dependencies --install-docker Install Docker only --start-docker Start Docker daemon
EXAMPLES: ./scripts/xact.sh # Auto-discover and run all workflows ./scripts/xact.sh .github/workflows/ci.yml # Run specific workflow ./scripts/xact.sh --job test # Run specific job ./scripts/xact.sh --simulate # Run in simulation mode
FEATURES: โ Automatic workflow discovery and validation โ Workflow-specific execution logic โ Professional colored output โ Intelligent dependency installation โ Hybrid real/simulation execution โ Automatic Docker daemon startup
HELP_EOF }
check_docker() { log "Checking Docker availability..."
if ! command -v docker &> /dev/null; then log "ERROR: Docker not installed" echo "docker: not found" return 1 fi
if ! docker info &> /dev/null; then log "ERROR: Docker daemon not running" echo "docker: daemon not running" return 1 fi
log "Docker is available and running" echo "docker: available" return 0 }
run_simulation() { log "Running in fallback simulation mode..."
cat << SIM_EOF === GitHub Actions Workflow Simulation ===
This is a fallback simulation for workflows requiring GitHub-specific features. Act is not available or Docker is not running.
Simulated workflow execution: โ Workflow syntax validation โ Job dependency analysis โ Environment variable validation โ Artifact path verification โ Security scan simulation
Simulation completed successfully. SIM_EOF return 0 }
install_dependencies() { log "Installing dependencies..." local install_failed=false
if ! command -v act &> /dev/null; then echo "Installing nektos/act..." if [[ "$OSTYPE" == "darwin"* ]]; then if command -v brew &> /dev/null; then if brew install act; then echo "โ nektos/act installed successfully" else echo "โ Failed to install nektos/act via Homebrew" install_failed=true fi else
Transform Claude Code into a complete development platform with 45 AI-powered commands that automate your entire software development workflow. Now with improved git identity management!
Design, analyze, and evolve system architecture using Domain-Driven Design, 12-Factor App, and proven patterns
Manage project configuration files, environment variables, and application settings
Continue an execution plan from where it left off across sessions
Interactive debugging support with error analysis and fix suggestions - integrates with Debug Specialist sub-agent for complexโฆ