Skip to content

Conversation

@thorwhalen
Copy link
Member

Add complete test infrastructure for the GitHub Actions local runner:

  • tests/test_local_cli.py: 40 unit tests covering all functions

    • Test dependency checking (act, Docker)
    • Test command construction and execution
    • Test CLI argument parsing
    • Test error handling and edge cases
  • tests/test_local_cli_integration.py: 13 integration tests

    • Test with actual workflow files
    • Test job and matrix execution
    • Test command construction with all options
    • Test error scenarios
  • tests/conftest.py: Pytest fixtures for test setup

    • Temporary workflow file fixture
    • Dependency mocking fixtures
  • pytest.ini: Test configuration with markers

    • Markers for unit, integration, and optional tests
    • Standard test discovery patterns
  • run_tests.sh: Convenient test runner script

    • Support for coverage reports
    • Pattern-based test selection
    • Verbose output option
  • tests/README.md: Comprehensive test documentation

    • How to run tests
    • Test organization and structure
    • Coverage information
    • Troubleshooting guide
  • LOCAL_CLI_USAGE.md: User documentation

    • Quick start guide
    • Installation instructions
    • Usage examples
    • Troubleshooting section

Test results: 51 passed, 2 skipped (require act/Docker installation)
Coverage: ~95% of local_cli.py code

All tests use mocking to avoid requiring act or Docker installation, making them runnable in any environment including CI systems.

Add complete test infrastructure for the GitHub Actions local runner:

- tests/test_local_cli.py: 40 unit tests covering all functions
  * Test dependency checking (act, Docker)
  * Test command construction and execution
  * Test CLI argument parsing
  * Test error handling and edge cases

- tests/test_local_cli_integration.py: 13 integration tests
  * Test with actual workflow files
  * Test job and matrix execution
  * Test command construction with all options
  * Test error scenarios

- tests/conftest.py: Pytest fixtures for test setup
  * Temporary workflow file fixture
  * Dependency mocking fixtures

- pytest.ini: Test configuration with markers
  * Markers for unit, integration, and optional tests
  * Standard test discovery patterns

- run_tests.sh: Convenient test runner script
  * Support for coverage reports
  * Pattern-based test selection
  * Verbose output option

- tests/README.md: Comprehensive test documentation
  * How to run tests
  * Test organization and structure
  * Coverage information
  * Troubleshooting guide

- LOCAL_CLI_USAGE.md: User documentation
  * Quick start guide
  * Installation instructions
  * Usage examples
  * Troubleshooting section

Test results: 51 passed, 2 skipped (require act/Docker installation)
Coverage: ~95% of local_cli.py code

All tests use mocking to avoid requiring act or Docker installation,
making them runnable in any environment including CI systems.
@thorwhalen thorwhalen merged commit 15f32d5 into master Nov 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants