-
Notifications
You must be signed in to change notification settings - Fork 741
ci: Add package pre-publish check #1893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
7ca1e0b
ci: Add package pre-publish check
vdusek 17c95fe
ci: inline package-check recipe, drop shared reusable workflow indire…
vdusek 92ad341
ci: extract package_check job into _check_package.yaml
vdusek 337668f
ci: point package check at apify/actions feature branch
vdusek 73c912c
ci: retrigger package check against updated action ref
vdusek 6b4367b
ci: point package check at apify/actions main branch
vdusek 70ec899
ci: pin package check to apify/actions v1.1.0
vdusek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Package check | ||
|
|
||
| on: | ||
| # Runs when manually triggered from the GitHub UI. | ||
| workflow_dispatch: | ||
|
|
||
| # Runs when invoked by another workflow. | ||
| workflow_call: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| package_check: | ||
| name: Package check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up uv package manager | ||
| uses: astral-sh/setup-uv@v8.1.0 | ||
| with: | ||
| python-version: "3.14" | ||
|
|
||
| - name: Build sdist and wheel | ||
| run: uv run poe build | ||
|
|
||
| - name: Verify built package | ||
| uses: apify/actions/python-package-check@v1.1.0 | ||
| with: | ||
| package_name: 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() | ||
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.