Skip to content

Standardize CI workflows: tests matrix, lint with format check, publish - #5

Merged
pattonw merged 1 commit into
mainfrom
chore/ci-templates
Nov 3, 2026
Merged

pattonw merged 1 commit into
mainfrom
chore/ci-templates

Conversation

@pattonw

@pattonw pattonw commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Why

The lint job's rule set was whatever the current ruff release considered default. ruff 0.16 widened those defaults substantially, so the unpinned job now reports 57 findings on code that was clean in February. The test workflow ran five interpreters at a single resolution, and the workflows were split across four files with older action majors.

What changes

  • tests.yaml replaces pytest.yaml: triggers on pull_request, pushes to main, and manual dispatch. Matrix is the requires-python floor and newest (3.10, 3.14) × highest/lowest-direct. setup-uv@v6 pins the interpreter; uv sync then pytest --cov=src with term-missing and xml reports.
  • lint.yaml replaces ruff.yaml and ty.yaml: ruff check ., ruff format --check . and ty check, each on pull requests.
  • publish.yaml: setup-uv@v6; runs on v* tags only. The PYPI_API_TOKEN secret is still used; id-token: write is in place for trusted publishing once a publisher is registered on PyPI.
  • pyproject.toml: [tool.ruff.lint] select = ["E4", "E7", "E9", "F"] pins the rule set to ruff's pre-0.16 defaults, so the job checks the same things it did before and stops drifting with releases. extend-exclude = ["*.md"] keeps ruff format (which formats Python fences in Markdown since 0.16) from collapsing the README's hand-aligned result comments.
  • README badges follow the renamed workflows.

Verified locally

  • ruff check . and ruff format --check .: clean with ruff 0.17.3.
  • pytest on 3.10 / lowest-direct and 3.14 / highest: 15 passed, 1 xfailed each.
  • ty check: 4 diagnostics (tests/test_coordinate.py 49, 53, 55: tuple arithmetic on Coordinate that the tests exercise on purpose; tests/test_questions.py 41). The last ty run in February was green with an older ty; this is tool drift, not a change here, so the ty job will be red until those four are annotated.

🤖 Generated with Claude Code

- tests.yaml replaces pytest.yaml: run on pull requests and pushes to
  main (and on dispatch); matrix is the requires-python floor and
  newest (3.10, 3.14) x highest/lowest-direct; setup-uv@v6; coverage
  reported in term-missing and xml form.
- lint.yaml replaces ruff.yaml and ty.yaml: ruff check, ruff format
  --check and ty on the whole tree as separate jobs.
- publish.yaml: setup-uv@v6; v* tags only.
- pyproject: pin the ruff rule set to ruff's pre-0.16 defaults so the
  lint job does not drift with ruff releases (0.16 widened the defaults
  and the unpinned job would report 57 findings today); exclude *.md
  from ruff so `ruff format` leaves the README's aligned examples alone.
- README badges follow the renamed workflows.

Co-Authored-By: Claude Mythos 5.1 <noreply@anthropic.com>
@pattonw
pattonw merged commit 4aa9266 into main Nov 3, 2026
5 of 6 checks passed
@pattonw
pattonw deleted the chore/ci-templates branch November 3, 2026 23:43
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