ci: smoke-test built wheel and sdist after build (closes #1169)#1589
Open
thehesiod wants to merge 3 commits into
Open
ci: smoke-test built wheel and sdist after build (closes #1169)#1589thehesiod wants to merge 3 commits into
thehesiod wants to merge 3 commits into
Conversation
Adds a ``test-dist`` matrix job (wheel, sdist) that depends on the ``build`` job and verifies the produced artifact installs into a fresh Python env and imports cleanly. ``twine check --strict`` (run in build) covers metadata validity; this complements it by catching missing-MANIFEST / broken-pyproject.toml / unresolvable-dependency classes of bugs that surface only at install time. Wired into the ``check`` aggregator so branch protection requires the smoke test alongside ``build``, ``test``, and ``zizmor``.
|
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Contributor
|
Claude finished @thehesiod's task in 2m 5s —— View job Code reviewRe-reviewed after
🤖 Generated with Claude Code |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1589 +/- ##
=======================================
Coverage 93.84% 93.84%
=======================================
Files 81 81
Lines 8462 8462
=======================================
Hits 7941 7941
Misses 521 521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
zizmor flags this job under `cache-poisoning` (#49). The smoke-test runs after `actions/download-artifact` pulls a freshly-built dist into the workspace, then uses the cached uv install path to set up a throwaway venv and `pip install` the artifact. A poisoned uv cache populated by an earlier (potentially fork) run would influence what gets installed alongside the dist under test, defeating the point of the smoke test. Pass `enable-cache: false` to setup-uv. The job installs one wheel into one venv — there's no meaningful time savings to lose, and turning off the cache removes the poisoning surface entirely.
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.
Summary
Adds a
test-distmatrix job (wheel, sdist) that depends onbuildand verifies the produced artifact installs into a fresh Python env and imports cleanly. The job is wired into thecheckaggregator so branch protection gates on it.Closes #1169.
What this catches that current CI doesn't
twine check --strict(inbuild)test)uv syncso an editable install — never actually exercises the built wheel/sdistThis new job catches the gap:
aiobotocore.httpxsessionrequires the[httpx]extra; smoke test uses it to verify the extra resolvesWhat this is NOT
@webknjaz's original framing in #1169 was broader: "the tests should depend on building the dists" — i.e., make the entire test matrix install from the dist artifact instead of editable source. That's a meaningful CI restructure (changes coverage paths, requires test files outside the source tree, breaks editable-install dev ergonomics). This PR is the smoke-test-sized increment; happy to file a follow-up for the full restructure if there's interest.
Implementation notes
uv venv+uv pip installfor env creation rather thanactions/setup-pythonto match the rest of the repo's tooling (every other job usesastral-sh/setup-uv).aiobotocore.session,client,config,endpoint,httpsession,httpxsession,credentials,response) — so an accidentally missing module surfaces in the smoke test rather than at user import time.Test plan
uv build, installed wheel into freshuv venv, all listed imports succeed.