Skip to content

[pre-commit.ci] pre-commit autoupdate #254

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #254

Workflow file for this run

# A workflow to build + test PyPI sdist/bdist artifacts
# (but not publish, as this is tricky without continuous automatic version generation)
#
# Reference:
# - https://github.com/actions/checkout
# - https://github.com/actions/download-artifact
# - https://github.com/actions/setup-python
# - https://github.com/actions/upload-artifact
# - https://github.com/pypa/build
name: ci-wheels
on: [pull_request, push]
jobs:
build-artifacts:
name: "Build PyPI artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Build sdist/bdist"
run: |
# ugrid-checks is a pure python package, so simply use pypa/build
pipx run build
- name: "Show sdist/bdist"
run: |
ls -l ${{ github.workspace }}/dist
- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
test-artifacts:
needs: [build-artifacts]
name: "Test bdist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/download-artifact@v4
with:
name: pypi-artifacts
path: ${{ github.workspace }}/dist
- name: "Install and import bdist"
working-directory: ${{ github.workspace }}/dist
run: |
python -m pip install ugrid_checks-*.whl
python -c "import ugrid_checks; print(f'Successfully imported ugrid-checks-{ugrid_checks.__version__}')"
echo "All done 👍"