ci: Add package verification check#1893
Draft
vdusek wants to merge 1 commit into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1893 +/- ##
==========================================
+ Coverage 92.82% 92.84% +0.01%
==========================================
Files 167 167
Lines 11699 11699
==========================================
+ Hits 10860 10862 +2
+ Misses 839 837 -2
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:
|
Guards against shipping a wheel or sdist that builds but crashes when installed - the silent failure mode behind PR #1890 - by adding a verification script and wiring it into PR CI and the release workflows as a pre-publish gate. Checks artifact contents, fresh-venv install of both wheel and sdist, core imports, and `crawlee create` scaffolding.
d3b1195 to
5b35186
Compare
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 an automated end-to-end verification of the built
sdist+wheelto guard against the silent failure mode behind #1890 — where artifacts build successfully but crash on install or import.New:
scripts/verify_built_package.py— a standalone script (runnable locally, nocrawleeinstall required) that:LICENSE,README.md,CHANGELOG.md,CONTRIBUTING.md,pyproject.toml), notests//docs//website//.github//examples/leakage, nouv.lock, all 192.pysources present, all 27 data files (everypy.typed, everyproject_template/**, every_redis/lua_scripts/*.lua) present..dist-info/METADATApresent plus the same source + data assertions.[all]extras and runs an import + crawler-construction smoke test.crawlee create --no-apify --no-install ...and asserts the scaffolded project files exist (catches a silently-droppedproject_template/).Takes ~10s locally, ~1 min in CI. Exits non-zero on any failure.
CI wiring:
.github/workflows/_check_package.yaml— new reusable workflow that builds + verifies.on_pull_request.yaml— runspackage_checkon every PR (parallel withtestsandcode_checks).manual_release_stable.yaml+manual_release_beta.yaml— inserts aVerify built packagestep inside thepypi_publishjob, between the prepare-distribution and PyPI upload steps. The exact byte-identical artifact about to be uploaded is verified.Verified locally
project_template/cookiecutter.jsonand a.luascript removed → flagged both, exited 1actionlintclean on all four workflows