Skip to content

ci: add Python CI for ruff + pytest under python/ - #7

Merged
justincasher merged 2 commits into
LeanPool:mainfrom
justincasher:justin/python-ci
May 9, 2026
Merged

justincasher merged 2 commits into
LeanPool:mainfrom
justincasher:justin/python-ci

Conversation

@justincasher

Copy link
Copy Markdown
Collaborator

Mirrors the pattern from numina/fuse for the python/ package.

  • astral-sh/setup-uv with cache enabled.
  • uv sync --locked --group <dev|test> — fails CI if python/uv.lock drifts.
  • Separate lint (ruff check + ruff format check) and test (pytest) jobs.
  • Triggers only when python/** or this workflow file changes.
  • concurrency.cancel-in-progress and read-only GITHUB_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.

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.
@justincasher
justincasher merged commit 4121df7 into LeanPool:main May 9, 2026
3 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.

1 participant