Skip to content

Commit

Permalink
ENH: Bump GitHub Actions versions
Browse files Browse the repository at this point in the history
All to the latest versions.
  • Loading branch information
thewtex committed Apr 20, 2024
1 parent 631fc0c commit 58c904a
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 117 deletions.
83 changes: 41 additions & 42 deletions .github/workflows/build-test-publish.yml
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
Expand All @@ -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:
Expand All @@ -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
21 changes: 10 additions & 11 deletions .github/workflows/lint.yml
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"
69 changes: 34 additions & 35 deletions .github/workflows/make-docs.yml
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
Expand All @@ -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'
Expand All @@ -53,4 +52,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
57 changes: 28 additions & 29 deletions .github/workflows/test-notebooks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: 'test-notebooks'
name: "test-notebooks"

on:
[push, pull_request]
on: [push, pull_request]

env:
aind-ccf-alignment-experiments-tag: 756e846d08b07fcffbc3c387216a59a9fa563fd6
Expand All @@ -11,32 +10,32 @@ jobs:
name: "Test Jupyter Notebooks with PyTest"
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: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- 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: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1

- name: "Install Dependencies Not Available on PyPI"
shell: bash
run: |
git clone https://github.com/AllenNeuralDynamics/aind-ccf-alignment-experiments.git
pushd aind-ccf-alignment-experiments
git checkout ${{ env.aind-ccf-alignment-experiments-tag }}
python -m pip install .
- name: "Install Dependencies Not Available on PyPI"
shell: bash
run: |
git clone https://github.com/AllenNeuralDynamics/aind-ccf-alignment-experiments.git
pushd aind-ccf-alignment-experiments
git checkout ${{ env.aind-ccf-alignment-experiments-tag }}
python -m pip install .
- name: "Install Dependencies with Flit"
shell: bash
run: |
python -m pip install flit
pushd src
flit install --extras all
- name: "Install Dependencies with Flit"
shell: bash
run: |
python -m pip install flit
pushd src
flit install --extras all
- name: "Run Tests"
shell: bash
run: |
pytest --nbmake --nbmake-timeout=30000 examples/*.ipynb -vvv -s -k "not LightsheetRegistration.ipynb"
- name: "Run Tests"
shell: bash
run: |
pytest --nbmake --nbmake-timeout=30000 examples/*.ipynb -vvv -s -k "not LightsheetRegistration.ipynb"

0 comments on commit 58c904a

Please sign in to comment.