Skip to content

Conversation

@presstab
Copy link
Owner

Overview
This pull request introduces a GitHub Actions workflow that automatically runs the test suite on every push and pull request, ensuring consistent quality across Python 3.9–3.12. In parallel, it resolves two small but blocking type-hint incompatibilities that prevented the codebase from running on Python 3.9.

What This Means for Users
No user-facing behaviour has changed; the JrDev terminal continues to work exactly as before. The only visible difference is the appearance of green “✅ All checks have passed” indicators on future pull requests, signalling that every proposed change has already been validated against the full test matrix.

A Closer Look at the Changes

  • Continuous Integration

    • A new workflow file .github/workflows/pytest.yml defines a matrix job that spins up four parallel Ubuntu runners, one for each supported Python version.
    • Each runner installs the project’s dependencies, executes pytest with coverage reporting, and uploads both the JUnit XML and the HTML coverage report as build artifacts for later inspection.
  • Python 3.9 Compatibility

    • Replaced the modern union syntax (dict | None, list | str) with typing.Union equivalents in two modules (model.py and confirmation.py).
    • Adjusted the return-type annotation of write_with_confirmation to Tuple[str, Optional[str]], aligning the declared type with the actual implementation.
      Generated by JrDev AI using moonshotai/kimi-k2-instruct

- Add Python 3.9–3.12 matrix strategy
- Cache pip dependencies for faster runs
- Install project deps and pytest-cov
- Generate XML/HTML coverage reports
- Upload artifacts for all outcomes
- Updated type hints to use Union[list, str] instead of list | str for broader Python version support
- Changed return type annotation from Tuple[str, str] to Tuple[str, Optional[str]] to accurately reflect that the second element can be None
@presstab presstab merged commit 7782299 into master Aug 13, 2025
8 checks passed
@presstab presstab deleted the ci_pytest branch August 22, 2025 22:55
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.

2 participants