Skip to content

Commit 458cfa4

Browse files
committed
ci: add package verification check
Adds an end-to-end check that the built sdist and wheel install cleanly and contain the expected sources via the shared apify/workflows/python-package-check action. Runs on every PR and inside the release flow between prepare-pypi-distribution and the PyPI publish step, guarding against silent build regressions.
1 parent a1d5d4c commit 458cfa4

4 files changed

Lines changed: 43 additions & 0 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Package check
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_call:
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
package_check:
12+
name: Package check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v6
17+
18+
- name: Set up uv package manager
19+
uses: astral-sh/setup-uv@v8.1.0
20+
with:
21+
python-version: "3.14"
22+
23+
- name: Build sdist and wheel
24+
run: uv run poe build
25+
26+
- name: Verify built package
27+
uses: apify/workflows/python-package-check@main
28+
with:
29+
package_name: apify_shared

.github/workflows/manual_release_beta.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ 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/workflows/python-package-check@main
65+
with:
66+
package_name: apify_shared
67+
6368
# Publish the package to PyPI using PyPA official GitHub action with OIDC authentication.
6469
- name: Publish package to PyPI
6570
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/manual_release_stable.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ jobs:
9595
version_number: ${{ needs.release_prepare.outputs.version_number }}
9696
ref: ${{ needs.changelog_update.outputs.changelog_commitish }}
9797

98+
- name: Verify built package
99+
uses: apify/workflows/python-package-check@main
100+
with:
101+
package_name: apify_shared
102+
98103
# Publishes the package to PyPI using PyPA official GitHub action with OIDC authentication.
99104
- name: Publish package to PyPI
100105
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
@@ -17,6 +17,10 @@ jobs:
1717
name: Code checks
1818
uses: ./.github/workflows/_check_code.yaml
1919

20+
package_check:
21+
name: Package check
22+
uses: ./.github/workflows/_check_package.yaml
23+
2024
tests:
2125
name: Tests
2226
uses: ./.github/workflows/_tests.yaml

0 commit comments

Comments
 (0)