Repository navigation
Add CI: lint, test suite, runtime contract, Windows smoke - #1
Merged
Merged
Conversation
Four workflows, none of which existed before. - test_cases.yml runs the pytest suite on Linux. - python_runtime_contract.yml runs it across 3.10 to 3.14, the range pyproject.toml promises, and imports every module on each. - windows_smoke.yml imports every module on Windows, which is the platform the PyInstaller and Inno Setup packaging targets and the one nothing tested before. - python_lint.yml runs pylint on changed files only, failing on warnings a change introduces rather than on pre-existing ones. Adds tools/ci_import_smoke.py and tools/lint_changed.py to support them. The changed-file list comes from git rather than a third-party action. Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Adds the four CI workflows this repo did not have. Nothing ran on a push or a pull request before this.
pyproject.tomlpromises withrequires-python = ">=3.10". Nothing else checks that promise.packaging/targets Windows with PyInstaller and Inno Setup, so it is the platform the tool ships on and the one nothing tested.Two supporting scripts:
tools/ci_import_smoke.pyandtools/lint_changed.py.The changed-file list is computed with plain git rather than a third-party changed-files action, so the job pulls in no external code at run time.
All eight jobs pass on this PR. The smoke test was checked in both directions before pushing, exit 0 on a clean tree and exit 1 naming the module when a deliberately broken one is added, so a green result means it looked at something.
One pre-existing issue this surfaced
test_backup_prune_keeps_recentpasses here (62 passed) and fails on a fast local machine (61 passed, 1 failed, 16 snapshots where it expects 20). That difference is the finding, not a flake to ignore.backup.snapshot()builds each filename from a millisecond timestamp with no collision guard:Twenty-five of those generated in a tight loop produce one distinct string. Snapshots landing in the same millisecond silently overwrite each other, so a snapshot someone took can be replaced by the next one. On the CI runner each backup takes over a millisecond, so names do not collide and the test passes; on faster hardware they do.
Not fixed here, since this PR is CI only. Worth its own PR, and the fix is a uniqueness guard on the name rather than a change to the test.