Add pytest and Python linting (ruff) to CI#1637
Merged
mnriem merged 3 commits intogithub:mainfrom Feb 19, 2026
Merged
Conversation
c81d34d to
d87bf78
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive Python testing and linting to the CI pipeline, addressing a gap where tests existed but were not being run automatically. The new workflow introduces ruff for code quality checks and pytest for running the existing test suite across multiple Python versions.
Changes:
- New GitHub Actions workflow
.github/workflows/test.ymlwith separate jobs for linting (ruff) and testing (pytest) - Ruff job runs format and lint checks on Python 3.13
- Pytest job runs the full test suite across Python 3.11, 3.12, and 3.13 using a matrix strategy
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Remove extraneous f-string prefixes (F541) - Split multi-statement lines (E701, E702) - Remove unused variable assignments (F841) - Remove ruff format check from CI workflow (format-only PR to follow) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Rich/Typer CLI injects ANSI escape codes into option names in --help output, causing plain string matching to fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1636
Changes
Adds a new
.github/workflows/test.ymlworkflow with two jobs:ruffjobuvx ruff check src/anduvx ruff format --check src/on Python 3.13pytestjobuv run pytestacross a Python 3.11 / 3.12 / 3.13 matrixuv sync --extra testBoth jobs trigger on pushes to
mainand on pull requests.Testing
Verified locally:
uv run pytest)ruff check src/andruff format --check src/pass clean