ci: publish without a token, and actually run the newer tests - #15
Merged
Conversation
publish.yml releases from a GitHub Release over PyPI's Trusted Publishing — OIDC, so there is no API token in the repository, in a secret, or anywhere to rotate. A token scoped to the wrong project already cost a 403 here, and the reflex fix for that is one account-wide token covering every package, which is the version worth avoiding. test.yml was running two of the five suites. The other three — AsyncKhwan, flush(), occurred_at — arrived after it was written and nothing added them, so 13 of 25 assertions were not being checked on any push. Installing .[async] is what lets the async suite run at all. Publishing runs every suite before it builds. A release tag is the last place to find out they fail.
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.
No more tokens
publish.ymlreleases from a GitHub Release over PyPI Trusted Publishing — OIDC, so there is no API token in the repository, in a secret, or anywhere to rotate.A token scoped to the wrong project already cost a
403 Forbiddenhere. The reflex fix for that is one account-wide token covering every package, which is the version worth avoiding.One-time setup on PyPI — this project's Publishing settings (not the pending-publisher page;
khwanis already published):khwanlabskhwan-client-pythonpublish.ymlpypiThen a release is a tag and a click. Same setup already works on khwan-crewai, published this way with no token at all.
CI was checking less than half the tests
test.ymlran two of the five suites. The other three —AsyncKhwan,flush(),occurred_at— arrived after it was written and nothing added them, so 13 of 25 assertions were not checked on any push, including the subprocess test that catches a background record being killed at exit.Installing
.[async]is what lets the async suite run at all.Publishing runs every suite before it builds — a release tag is the last place to discover they fail.