Build and test a wheel and source distribution in clean consumers.
Declare build-system in pyproject.toml and pin its backend in
build-system.requires. The action runs uv build --no-sources, installs the
wheel and sdist independently in temporary venvs, checks dependencies and runs
the supplied commands outside the source checkout.
PACKAGE_NAME, PACKAGE_VERSION and the consumer venv's PATH are available
to the trusted Bash smoke tests. For example, use python -I -c "import my_package"
to check the installed distribution. Command failures fail the action.
Temporary environments are cleaned after success or failure. Build backends
execute code; there is no general equivalent to npm's ignore-scripts switch.
The action does not publish to PyPI. Enable it in the reusable workflow with
package: "true" or a JSON object containing tests.
Run setup-python first with the same working-directory.
See the continuous integration workflow for orchestration and version matrices.
- uses: hoverkraft-tech/ci-github-python/actions/package/test@4b801b911424c68370a3e713bc5404151ab4d772 # main
with:
# uv package directory with a build-system.
# Default: `.`
working-directory: .
# Optional trusted Bash smoke tests run separately against the installed wheel and sdist. The consumer venv is on PATH; PACKAGE_NAME and PACKAGE_VERSION identify the distribution. Source checkout is not the working directory.
commands: ""| Input | Description | Required | Default |
|---|---|---|---|
working-directory |
uv package directory with a build-system. | false | . |
commands |
Optional trusted Bash smoke tests run separately against the installed wheel and sdist. The consumer venv is on PATH; PACKAGE_NAME and PACKAGE_VERSION identify the distribution. Source checkout is not the working directory. | false | - |
Contributions are welcome! Please see the contributing guidelines for more details.
This project is licensed under the MIT License.
SPDX-License-Identifier: MIT
Copyright © 2026 hoverkraft
For more details, see the license.
This documentation was automatically generated by CI Dokumentor.