Skip to content

Add CI: lint, test suite, runtime contract, Windows smoke - #1

Merged
abrignoni merged 1 commit into
mainfrom
ci/add-workflows
Sep 2, 2026
Merged

abrignoni merged 1 commit into
mainfrom
ci/add-workflows

Conversation

@abrignoni

@abrignoni abrignoni commented Sep 2, 2026 •

Copy link
Copy Markdown
Owner

Adds the four CI workflows this repo did not have. Nothing ran on a push or a pull request before this.

  • test_cases.yml runs the pytest suite on Linux.
  • python_runtime_contract.yml runs the suite and a full-package import across Python 3.10 to 3.14, the range pyproject.toml promises with requires-python = ">=3.10". Nothing else checks that promise.
  • windows_smoke.yml imports every module on Windows. packaging/ targets Windows with PyInstaller and Inno Setup, so it is the platform the tool ships on and the one nothing tested.
  • python_lint.yml runs pylint on the files a PR touches and fails only on warnings that PR introduces, so existing debt does not block unrelated work.

Two supporting scripts: tools/ci_import_smoke.py and tools/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_recent passes 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:

ts = _dt.datetime.now().strftime("%Y%m%d-%H%M%S-%f")[:-3]   # ms precision

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.

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]>
@abrignoni
abrignoni merged commit 50ed85d into main Sep 2, 2026
8 checks passed
@abrignoni
abrignoni deleted the ci/add-workflows branch September 2, 2026 02:18
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