Skip to content

Latest commit

 

History

History
136 lines (85 loc) · 5.87 KB

README.md

File metadata and controls

136 lines (85 loc) · 5.87 KB

Icon GitHub Action: Test Python distribution

Test Python distribution

Marketplace Release License Stars PRs Welcome

Overview

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.

Usage

- 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: ""

Inputs

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 -

Contributing

Contributions are welcome! Please see the contributing guidelines for more details.

License

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.