DOC: Update logo #40
Workflow file for this run
This file contains 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: "build-test-publish" | |
on: [push, pull_request] | |
jobs: | |
build_wheel: | |
name: Build Python wheels | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: "Build pure Python wheels" | |
run: | | |
python -m pip install hatch | |
cd src | |
hatch build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheel | |
path: ./src/dist/itk_dreg-*.whl | |
pytest: | |
name: "Test with PyTest" | |
runs-on: ubuntu-latest | |
needs: | |
- build_wheel | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: "Install Dependencies" | |
shell: bash | |
working-directory: src | |
run: | | |
python -m pip install -e '.[test]' | |
- name: "Install itk-dreg from source" | |
working-directory: src | |
run: | | |
wheel_name_full=`(find . -name "itk_dreg-*.whl")` | |
python -m pip install -e '.[test]' | |
- name: "Run Tests" | |
shell: bash | |
working-directory: src | |
run: | | |
pytest -vvv -s -k "not localcluster and not serialize_pairwise_result" | |
publish: | |
needs: | |
- build_wheel | |
- pytest | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
environment: | |
name: pypi | |
url: https://pypi.org/p/itk-dreg | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Download Python Wheel Artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: wheel | |
path: dist | |
- name: "Publish Python wheel to the Python Package Index" | |
uses: pypa/[email protected] | |
with: | |
skip_existing: true |