Skip to content

[ci] Add test workflow and gate releases on it - #1

Merged
drycode merged 1 commit into
mainfrom
dy/ci-test-gate
Jul 23, 2026
Merged

[ci] Add test workflow and gate releases on it#1
drycode merged 1 commit into
mainfrom
dy/ci-test-gate

Conversation

@drycode

@drycode drycode commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

The repo had no CI. The 114-test suite only ever ran locally, and release.yml went tag → build → publish with nothing in between — and python -m build never imports the package, so an ImportError would have published cleanly. PyPI versions are immutable, so that mistake costs a version number permanently.

Changes

  • ci.ymlruff check + pytest on push to main and on PRs. macOS only (the sole supported platform), Python 3.11 and 3.13 to bracket requires-python.
  • release.yml — the publish job now needs: a passing suite, and asserts the pushed tag matches tailctl.__version__ before anything reaches PyPI.
  • pyproject.toml — version is now dynamic, read from src/tailctl/__init__.py. It was duplicated in both places with nothing checking they agreed.
  • actions/checkout and actions/setup-python bumped to v7, clearing the Node 20 deprecation warning on the 0.1.1 release run.

Verification

ruff check and pytest (114 passed) green locally; python -m build produces tailctl-0.1.1 from the dynamic version. This PR's own CI run is the real proof — that's why it's a PR rather than a push to main.

The repo had no CI: 114 tests only ever ran on a laptop, and release.yml
went tag -> build -> publish with nothing in between. `python -m build`
never imports the package, so an ImportError would have published fine.
PyPI versions are immutable, so that mistake costs a version number.

- ci.yml runs ruff + pytest on push and PR, macOS (the only supported
  platform), on 3.11 and 3.13 to bracket requires-python.
- release.yml now needs a passing suite, and asserts the tag matches
  tailctl.__version__ before publishing.
- pyproject reads the version from src/tailctl/__init__.py instead of
  duplicating it, so the two can no longer disagree.
- checkout/setup-python bumped to v7, clearing the Node 20 deprecation.

Solves: unverified release path, duplicated version string
Tests: ruff + pytest green locally; python -m build produces 0.1.1 from
the dynamic version
@drycode
drycode merged commit 9d085b9 into main Jul 23, 2026
2 checks passed
@drycode
drycode deleted the dy/ci-test-gate branch July 23, 2026 16:22
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