Skip to content

Commit

Permalink
Update workflows to remove cancel action and align with hdmf
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Nov 27, 2024
1 parent 9fe07c2 commit 026d5b4
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 109 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/HDMF_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,14 @@ on: [pull_request, workflow_dispatch]
jobs:
check_compatibility:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
fetch-depth: 0 # tags are required for versioneer to determine the version
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python 3.13
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
Expand All @@ -26,7 +22,7 @@ jobs:
python -m pip install -r requirements-dev.txt -r requirements.txt
pip install .
- name: Clone HDMF Dev Branch
- name: Clone and Install HDMF Dev Branch
run: |
git clone https://github.com/hdmf-dev/hdmf.git --recurse-submodules
cd hdmf
Expand All @@ -36,7 +32,7 @@ jobs:
- name: Run HDMF_Zarr Tests
run:
pytest -v tests
pytest -v



5 changes: 2 additions & 3 deletions .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,13 @@ jobs:
name: Deploy release from tag
runs-on: ubuntu-latest
steps:
- name: Checkout repo with submodules
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'

- name: Install build dependencies
run: |
Expand All @@ -28,11 +25,11 @@ jobs:
- name: Run tox tests
run: |
tox -e py312-upgraded
tox -e py313-upgraded
- name: Build wheel and source distribution
run: |
tox -e build-py312-upgraded
tox -e build-py313-upgraded
ls -1 dist
- name: Test installation from a wheel
Expand Down
63 changes: 32 additions & 31 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -47,16 +50,8 @@ jobs:
- { name: macos-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-python3.13-prerelease , test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -68,22 +63,33 @@ jobs:
python -m pip install --upgrade pip
python -m pip install tox
python -m pip list
- name: Run tox tests
run: |
tox -e ${{ matrix.test-tox-env }}
- name: Build wheel and source distribution
run: |
tox -e ${{ matrix.build-tox-env }}
ls -1 dist
- name: Test installation from a wheel
run: |
tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl
- name: Test installation from a source distribution
run: |
tox -e wheelinstall --recreate --installpkg dist/*.tar.gz
run-all-gallery-tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand All @@ -98,16 +104,8 @@ jobs:
- { name: macos-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: macos-latest }
- { name: macos-gallery-python3.13-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: macos-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -119,15 +117,20 @@ jobs:
python -m pip install --upgrade pip
python -m pip install tox
python -m pip list
- name: Run tox tests
run: |
tox -e ${{ matrix.test-tox-env }}
run-all-tests-on-conda:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0} # needed for conda environment to work
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
Expand All @@ -141,22 +144,15 @@ jobs:
- { name: conda-linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest }
- { name: conda-linux-python3.13-prerelease, test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest }
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0 # tags are required for versioneer to determine the version
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Conda
uses: conda-incubator/setup-miniconda@v2
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-ver }}
channels: conda-forge

- name: Install build dependencies
run: |
Expand All @@ -170,6 +166,7 @@ jobs:
conda config --show-sources
conda list --show-channel-urls
# NOTE tox installs packages from PyPI not conda-forge...
- name: Run tox tests
run: |
tox -e ${{ matrix.test-tox-env }}
Expand All @@ -182,3 +179,7 @@ jobs:
- name: Test installation from a wheel
run: |
tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl
- name: Test installation from a source distribution
run: |
tox -e wheelinstall --recreate --installpkg dist/*.tar.gz
16 changes: 6 additions & 10 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,22 @@ jobs:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.opt_req }}
cancel-in-progress: true
strategy:
matrix:
include:
- { os: ubuntu-latest , opt_req: true }
- { os: ubuntu-latest , opt_req: false }
- { os: windows-latest, opt_req: false }
- { os: macos-latest , opt_req: false }
env:
env: # used by codecov-action
OS: ${{ matrix.os }}
PYTHON: '3.13'
steps:
- name: Cancel non-latest runs
uses: styfle/[email protected]
with:
all_but_latest: true
access_token: ${{ github.token }}

- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
Expand Down
Loading

0 comments on commit 026d5b4

Please sign in to comment.