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.0.tar.gz (9.9 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.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gha_debug-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 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.0.tar.gz
Algorithm Hash digest
SHA256 3b01c581a0ef7be02df1cc9a951f129f89f2af3b6e8ac137db99d78e9421a75a
MD5 6e371dfee1f70bd673dc531443246eaa
BLAKE2b-256 2055bced257f38eafb5dde15a85ec26507ccf22418d9731a351843bdb87f33bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gha_debug-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1005b33e7e2eb3f3dcc9b4bf85bf4725a66927ca06fd9dbf4b349149890a4717
MD5 1a330198b3228db9b24e3520497a2565
BLAKE2b-256 d793992670bb92ffb6898e98fe3b853ce3f85172e060e513ce0492c1ebb5bf13

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