Repository navigation
ci: fail on format and lint errors, and test each matrix Python - #29
Merged
Merged
Conversation
The lock held ruff 0.11.12 while the latest is 0.17.5, so local and CI lint results depended on which one ran. Pin it exactly so a ruff release cannot change what CI reports without a commit here.
CI ran `just validate`, whose ruff format and ruff check --fix repair problems in place, so they never failed a build. CI now runs a new `just check` (ruff format --check, ruff check, pytest); validate stays for local auto-fixing. The matrix never took effect: uv used the runner's /usr/bin/python3 (3.14) in every job. Set UV_PYTHON and setup-python to the matrix version, assert it in a step, and add 3.14 so it stays covered. Push builds also skipped branch names containing a /, because "*" does not cross /. Use "**".
setup-python has no 3.9 build for ubuntu-latest (Ubuntu 26.04), so the 3.9 job failed at setup. With UV_PYTHON set, uv downloads its own build of each matrix version when the runner lacks it.
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.
Summary
CI had three gaps:
just validate, whoseruff formatandruff check --fixfix problems in place, so formatting and lint errors never failed a build./usr/bin/python3(3.14), so nothing tested 3.9–3.13./.Changes
build: pin ruff to 0.17.5: the lock held 0.11.12. An exact pin means a ruff release can't change what CI reports without a commit here.style: sort imports in phantom.py: the one finding ruff 0.17.5 reports on master (I001). Kept apart from the CI change.ci:commits:just check(ruff format --check,ruff check, pytest). CI runs it;just validatestays for local auto-fixing.UV_PYTHONis set to the matrix version, so uv installs and uses it, and a step asserts the interpreter in use matches it. The setup-python step is gone, because it has no 3.9 build forubuntu-latest(Ubuntu 26.04), which made the first run of this branch fail at setup.branches: "**"sofix/…-style branches build on push.Review focus
Verification
just dev-sync, thenjust check): format and lint clean, 65 passed, 0 skipped.uv sync --locked): 65 passed, 0 skipped on both.just checkfails on a misformatted line (exit 1 atformat-check), andlint-checkfails on an unsorted, unused import.format-check: "1 file would be reformatted"; branch since deleted): https://github.com/HurricaneLabs/splunksecrets/actions/runs/44335763908Docs
None needed. The Justfile comment says which recipe CI runs.
Summary by CodeRabbit