Skip to content

Add CI, and gate the PyPI publish behind the tests#9

Merged
mcgarrah merged 2 commits into
mainfrom
claude/add-ci-and-test-gate
Jul 13, 2026
Merged

Add CI, and gate the PyPI publish behind the tests#9
mcgarrah merged 2 commits into
mainfrom
claude/add-ci-and-test-gate

Conversation

@mcgarrah

Copy link
Copy Markdown
Owner

Summary

This repository had no CI at all. publish-to-pypi.yml was the only workflow, so pull requests merged with nothing verifying them — #8 reported zero checks.

Worse, that publish workflow never ran the tests. Its steps were: checkout → build → release → upload. A version tag went straight to PyPI regardless of whether the code worked — and a bad PyPI release cannot be undone. It can only be yanked, and the version number is burned forever.

Changes

ci.yml (new) — on push and pull request:

  • Unit tests across the Python versions pyproject.toml claims to support (requires-python = ">=3.8"), plus 3.13 as used by the release build
  • A build job running python -m build + twine check, so a broken package is caught before a tag can immortalize it

publish-to-pypi.yml — adds a test step before the build, so a tag physically cannot ship code that fails its own suite, and a twine check before the GitHub release is created.

Integration tests (need a live API key) and django tests are excluded from both gates — neither belongs in a PR check.

Note

This PR is its own first customer: the checks below are the CI it adds.

🤖 Generated with Claude Code

claude added 2 commits July 13, 2026 18:32
The 0.1.10 merge added the timeout and its exception but left the docs
describing the old exception hierarchy, which no longer matches what the
library raises.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The repository had no CI at all. publish-to-pypi.yml was the only
workflow, so pull requests merged with nothing verifying them — PR #8
reported zero checks.

Worse, that publish workflow never ran the tests: its steps were
checkout, build, release, upload. A version tag went straight to PyPI
regardless of whether the code worked, and a bad PyPI release cannot be
undone — it can only be yanked, and the version number is burned forever.

Adds ci.yml: unit tests on push and pull request across the Python
versions pyproject.toml claims to support (3.8 floor, 3.13 as used by the
release build), plus a build job that runs twine check so a broken
package is caught before a tag can immortalize it.

Adds a test step to publish-to-pypi.yml before the build, so a tag
physically cannot ship code that fails its own suite, and a twine check
before the release is created.

Integration tests (live API key) and django tests are excluded from both
gates; neither belongs in a pull-request check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012RTKj5gZTg1zWmZM8TL2yq
@mcgarrah
mcgarrah merged commit 352a138 into main Jul 13, 2026
4 checks passed
@mcgarrah
mcgarrah deleted the claude/add-ci-and-test-gate branch July 13, 2026 18:34
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.

2 participants