Fixup some errors in packaging workflow #6
Workflow file for this run
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
| name: Reusable Python packaging tests | ||
|
Check failure on line 1 in .github/workflows/python-packaging.yml
|
||
| on: | ||
| workflow_call: | ||
| additional-apt-packages: | ||
| description: 'Additional APT packages to install' | ||
| required: false | ||
| type: string | ||
| default: '' | ||
| working-directory: | ||
| description: 'Working directory to use (default if unspecified)' | ||
| required: false | ||
| type: string | ||
| default: '.' | ||
| cli-test-cmd: | ||
| description: 'CLI test command to run' | ||
| default: '' | ||
| type: string | ||
| jobs: | ||
| python-packaging: | ||
| name: Python packaging tests | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - name: Cancel Previous Runs | ||
| uses: styfle/cancel-workflow-action@0.12.1 | ||
| with: | ||
| access_token: ${{ github.token }} | ||
| - uses: actions/checkout@v4.2.2 | ||
| - name: Install additional APT packages | ||
| if: ${{ inputs.additional-apt-packages != '' }} | ||
| run: sudo apt-get update && sudo apt-get install -y ${{ inputs.additional-apt-packages }} | ||
| - uses: actions/setup-python@v5.4.0 | ||
| with: | ||
| python-version: '3.12' | ||
| - name: Install build deps | ||
| run: | | ||
| pip install uv | ||
| uv pip install --system build twine validate-pyproject[all] | ||
| - name: Check package | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: | | ||
| validate-pyproject pyproject.toml | ||
| python -m build | ||
| python -m twine check --strict dist/* | ||
| - name: Install | ||
| working-directory: ${{ inputs.working-directory }} | ||
| run: python -m pip install dist/*.whl | ||
| - name: Run CLI (if present) | ||
| if: ${{ inputs.cli-test-cmd != '' }} | ||
| run: ${{ inputs.cli-test-cmd }} | ||