-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All to the latest versions.
- Loading branch information
Showing
4 changed files
with
113 additions
and
117 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
name: 'build-test-publish' | ||
name: "build-test-publish" | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/<your-pypi-project-name> | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
|
||
jobs: | ||
build_wheel: | ||
name: Build Python wheels | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.11" | ||
- name: "Build pure Python wheels" | ||
run: | | ||
python -m pip wheel -w dist -e src/ | ||
- uses: actions/upload-artifact@v3 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel | ||
path: ./dist/itk_dreg-*.whl | ||
|
@@ -33,36 +32,36 @@ jobs: | |
needs: | ||
- build_wheel | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Update pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- 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 | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: "Install Dependencies" | ||
shell: bash | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel | ||
|
||
- name: "Install itk_dreg from Wheel Artifact" | ||
run: | | ||
wheel_name_full=`(find . -name "itk_dreg-*.whl")` | ||
python -m pip uninstall -y itk_dreg | ||
python -m pip install ${wheel_name_full} | ||
- name: "Install itk_dreg from Wheel Artifact" | ||
run: | | ||
wheel_name_full=`(find . -name "itk_dreg-*.whl")` | ||
python -m pip uninstall -y itk_dreg | ||
python -m pip install ${wheel_name_full} | ||
- name: "Run Tests" | ||
shell: bash | ||
run: | | ||
pytest ./test -vvv -s -k "not localcluster and not serialize_pairwise_result" | ||
- name: "Run Tests" | ||
shell: bash | ||
run: | | ||
pytest ./test -vvv -s -k "not localcluster and not serialize_pairwise_result" | ||
publish: | ||
needs: | ||
|
@@ -71,13 +70,13 @@ jobs: | |
runs-on: ubuntu-22.04 | ||
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | ||
steps: | ||
- name: Download Python Wheel Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: wheel | ||
path: dist | ||
- 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 | ||
- name: "Publish Python wheel to the Python Package Index" | ||
uses: pypa/[email protected] | ||
with: | ||
skip_existing: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
name: 'lint' | ||
name: "lint" | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
ruff-check: | ||
name: "Lint with Ruff" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
src: "./src" | ||
- uses: actions/checkout@v4 | ||
- uses: chartboost/ruff-action@v1 | ||
with: | ||
src: "./src" | ||
|
||
black-autoformat: | ||
name: "Lint with Black" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: psf/black@stable | ||
with: | ||
src: "./src" | ||
- uses: actions/checkout@v4 | ||
- uses: psf/black@stable | ||
with: | ||
src: "./src" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: 'doc' | ||
name: "doc" | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
permissions: | ||
pages: write | ||
|
@@ -12,37 +11,37 @@ jobs: | |
name: "Build HTML Documentation with Sphinx" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Update pip | ||
run: | | ||
python -m pip install --upgrade pip | ||
- name: "Install Dependencies" | ||
shell: bash | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: "Build HTML API Documentation" | ||
shell: bash | ||
run: | | ||
sphinx-apidoc -o tmp/apidoc src/itk_dreg --full | ||
sed -i -e 's/alabaster/furo/' tmp/apidoc/conf.py | ||
sphinx-build tmp/apidoc tmp/html | ||
- name: Upload HTML artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: itk-dreg-html-docs | ||
path: tmp/html/* | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
path: tmp/html | ||
- 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 | ||
run: | | ||
python -m pip install flit | ||
cd src | ||
flit install --deps develop | ||
- name: "Build HTML API Documentation" | ||
shell: bash | ||
run: | | ||
sphinx-apidoc -o tmp/apidoc src/itk_dreg --full | ||
sed -i -e 's/alabaster/furo/' tmp/apidoc/conf.py | ||
sphinx-build tmp/apidoc tmp/html | ||
- name: Upload HTML artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: itk-dreg-html-docs | ||
path: tmp/html/* | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
path: tmp/html | ||
|
||
deploy: | ||
if: github.ref == 'refs/heads/main' | ||
|
@@ -53,4 +52,4 @@ jobs: | |
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 | ||
uses: actions/deploy-pages@v4 |
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