ci: Add package pre-publish check#1893
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1893 +/- ##
==========================================
- Coverage 92.86% 92.84% -0.02%
==========================================
Files 167 167
Lines 11699 11699
==========================================
- Hits 10864 10862 -2
- Misses 835 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:
|
d3b1195 to
5b35186
Compare
153d5ca to
7ca1e0b
Compare
…ction Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
| - name: Verify built package | ||
| uses: apify/workflows/python-package-check@main | ||
| with: | ||
| package_name: crawlee | ||
| src_package_dir: src/crawlee | ||
| dist_dir: dist | ||
| python_version: "3.14" | ||
| extras: all | ||
| smoke_code: | | ||
| from crawlee.crawlers import ( | ||
| HttpCrawler, BeautifulSoupCrawler, ParselCrawler, | ||
| PlaywrightCrawler, AdaptivePlaywrightCrawler, | ||
| ) | ||
| from crawlee.storages import Dataset, KeyValueStore, RequestQueue | ||
| from crawlee.http_clients import HttpxHttpClient, ImpitHttpClient | ||
| from crawlee import Request | ||
| HttpCrawler() | ||
| BeautifulSoupCrawler() | ||
| ParselCrawler() |
There was a problem hiding this comment.
I see this is repeated three times in the diff - is that necessary? Or a lesser evil than setting up a reusable workflow/action?
There was a problem hiding this comment.
At first, I tried to implement it as a dedicated reusable workflow, but I didn't see much benefit there. This is just a configuration, and each repo has its own smoke test, can have a different rollout timing for new Python versions, and so on. When I prepared it, it felt like an unnecessary middle layer with very little added value. So I removed it and kept only the action itself there.
Summary
Adds an end-to-end check that the built sdist and wheel install cleanly, expose the expected sources and data files (
py.typed,project_template/**,_redis/lua_scripts/*.lua), and pass an import +crawlee createsmoke test — guarding against the silent failure mode behind #1890.Wired into every PR via a new reusable
_check_package.yaml, and into both stable and beta release workflows so the exact artifact about to hit PyPI is verified first.