Skip to main content

Debug GitHub Actions workflows locally with step-by-step execution

Project description

gha-debug

Debug GitHub Actions workflows locally with step-by-step execution

License: MIT

Overview

gha-debug is a lightweight CLI tool that helps developers test and debug GitHub Actions workflows locally before pushing to CI. Unlike heavy Docker-based solutions, it provides fast validation, clear step-by-step execution visibility, and helpful error messages.

Installation

pip install gha-debug

Usage

Run a workflow locally

gha-debug run .github/workflows/test.yml

Run a specific job with verbose output

gha-debug run .github/workflows/build.yml --job build --verbose

List all workflows and jobs

gha-debug list

Show environment variables for a job

gha-debug env .github/workflows/deploy.yml --job deploy

Validate workflow syntax

gha-debug validate .github/workflows/*.yml

Features

  • ✅ Parse and validate GitHub Actions workflow YAML files
  • ✅ List all workflows, jobs, and steps with clear formatting
  • ✅ Run workflows locally with simulated GitHub Actions environment
  • ✅ Show detailed step-by-step execution with timing information
  • ✅ Display environment variables and contexts for debugging
  • ✅ Validate workflow syntax and catch common errors before pushing
  • ✅ Colorized output for better readability
  • ✅ Support for filtering by specific job within a workflow

Why gha-debug?

Debugging GitHub Actions workflows is painful:

  • Logs are hard to navigate in the web interface
  • Re-running failed jobs wastes time
  • No simple local testing that mirrors the CI environment

gha-debug solves this by providing a fast feedback loop. It doesn't try to perfectly replicate GitHub's environment (which causes compatibility issues), but instead focuses on what developers need most: quick validation and clear error messages.

Example Output

$ gha-debug run .github/workflows/test.yml

Running workflow: test.yml
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Job: test
  ✓ Checkout code (1.2s)
  ✓ Setup Python 3.11 (0.8s)
  ✓ Install dependencies (4.5s)
  ✓ Run tests (12.3s)

✓ Workflow completed successfully in 18.8s

License

MIT License - Copyright (c) 2026 Intellirim

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gha_debug-0.1.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gha_debug-0.1.2-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file gha_debug-0.1.2.tar.gz.

File metadata

  • Download URL: gha_debug-0.1.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for gha_debug-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0b799de9c96e99d0b1892c8c2c6afa05c3f7c61af4173bf62c0bed194342e7ee
MD5 33f8d3cd47b99d41cc2df963ad2eb01d
BLAKE2b-256 cab227cd54b4ebe9f0c38a9dd40a40568007f2fe11cb789ee3296071fdfade9e

See more details on using hashes here.

File details

Details for the file gha_debug-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: gha_debug-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for gha_debug-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4418bdf414a63e37f91c347396ea52cc178d573b53d40ec3c1230e7b8ed0a5
MD5 018aaa084fb2c86d3932395bada59b9d
BLAKE2b-256 a269f6237175230a2829fb27f9a12eaf32134cc67cd51460962e7790912a121f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page