Repository navigation
ci: add Python CI for ruff + pytest under python/ - #7
Merged
Merged
Conversation
Mirrors the pattern from numina/fuse: - astral-sh/setup-uv with cache enabled - `uv sync --locked --group <dev|test>` so CI fails when uv.lock drifts - Separate lint and test jobs Triggers only when python/ or this workflow file changes, with concurrency.cancel-in-progress for superseded runs and read-only GITHUB_TOKEN permissions. The pytest step is guarded against "no tests collected" since python/tests/ is empty so far. Remove the guard once real tests land.
The previous glob (tests/test_*.py or tests/**/test_*.py) was fragile: it missed *_test.py files and bash globstar isn't enabled by default, so the recursive pattern didn't match nested tests. Run pytest unconditionally and treat its "no tests collected" exit code (5) as success; any other failure still fails the job.
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.
Mirrors the pattern from numina/fuse for the
python/package.astral-sh/setup-uvwith cache enabled.uv sync --locked --group <dev|test>— fails CI ifpython/uv.lockdrifts.lint(ruff check + ruff format check) andtest(pytest) jobs.python/**or this workflow file changes.concurrency.cancel-in-progressand read-onlyGITHUB_TOKEN.The pytest step is guarded against pytest's exit-5 "no tests collected" since
python/tests/is empty so far. Remove the guard once real tests land.