Skip to content

Commit 545ce47

Browse files
authored
ci: add package verification check (#897)
## Summary Adds an end-to-end check that the built sdist and wheel install cleanly, ship the expected sources and data files, and that `import apify` works — via the shared [apify/workflows/python-package-check](apify/workflows#296) action. Wired into every PR via `_check_package.yaml`, and into both stable and beta release workflows so the exact artifact about to hit PyPI is verified first. ## Verified locally Built `dist/` and ran the verification — all checks pass (`apify==3.4.0`, sdist + wheel both install cleanly into a fresh Python 3.14 venv).
1 parent 212572e commit 545ce47

4 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Package check
2+
3+
on:
4+
# Runs when manually triggered from the GitHub UI.
5+
workflow_dispatch:
6+
7+
# Runs when invoked by another workflow.
8+
workflow_call:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
package_check:
15+
name: Package check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v6
20+
21+
- name: Set up uv package manager
22+
uses: astral-sh/setup-uv@v8.1.0
23+
with:
24+
python-version: "3.14"
25+
26+
- name: Build sdist and wheel
27+
run: uv run poe build
28+
29+
- name: Verify built package
30+
uses: apify/actions/python-package-check@v1.1.0
31+
with:
32+
package_name: apify
33+
dist_dir: dist
34+
python_version: "3.14"
35+
smoke_code: |
36+
from apify import Actor, Configuration, ProxyConfiguration
37+
Configuration()
38+
ProxyConfiguration()

.github/workflows/manual_release_beta.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ jobs:
6060
version_number: ${{ needs.release_prepare.outputs.version_number }}
6161
ref: ${{ needs.changelog_update.outputs.changelog_commitish }}
6262

63+
- name: Verify built package
64+
uses: apify/actions/python-package-check@v1.1.0
65+
with:
66+
package_name: apify
67+
dist_dir: dist
68+
python_version: "3.14"
69+
smoke_code: |
70+
from apify import Actor, Configuration, ProxyConfiguration
71+
Configuration()
72+
ProxyConfiguration()
73+
6374
# Publish the package to PyPI using PyPA official GitHub action with OIDC authentication.
6475
- name: Publish package to PyPI
6576
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/manual_release_stable.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,17 @@ jobs:
9898
version_number: ${{ needs.release_prepare.outputs.version_number }}
9999
ref: ${{ needs.changelog_update.outputs.changelog_commitish }}
100100

101+
- name: Verify built package
102+
uses: apify/actions/python-package-check@v1.1.0
103+
with:
104+
package_name: apify
105+
dist_dir: dist
106+
python_version: "3.14"
107+
smoke_code: |
108+
from apify import Actor, Configuration, ProxyConfiguration
109+
Configuration()
110+
ProxyConfiguration()
111+
101112
# Publish the package to PyPI using PyPA official GitHub action with OIDC authentication.
102113
- name: Publish package to PyPI
103114
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/on_pull_request.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525
name: Code checks
2626
uses: ./.github/workflows/_check_code.yaml
2727

28+
package_check:
29+
name: Package check
30+
uses: ./.github/workflows/_check_package.yaml
31+
2832
tests:
2933
name: Tests
3034
uses: ./.github/workflows/_tests.yaml

0 commit comments

Comments
 (0)