diff --git a/.github/workflows/HDMF_dev.yaml b/.github/workflows/HDMF_dev.yaml index b493b079..147c1d7c 100644 --- a/.github/workflows/HDMF_dev.yaml +++ b/.github/workflows/HDMF_dev.yaml @@ -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/cancel-workflow-action@0.11.0 - 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" @@ -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 @@ -36,7 +32,7 @@ jobs: - name: Run HDMF_Zarr Tests run: - pytest -v tests + pytest -v diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 59773b8b..18c85d73 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -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 diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index d8c4566c..0af20a40 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -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: | @@ -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 diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 92bf2fcc..c3272466 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -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: @@ -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/cancel-workflow-action@0.11.0 - 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 @@ -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: @@ -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/cancel-workflow-action@0.11.0 - 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 @@ -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: @@ -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/cancel-workflow-action@0.11.0 - 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: | @@ -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 }} @@ -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 diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index 21150fc5..21a87cbf 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -19,6 +19,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.opt_req }} + cancel-in-progress: true strategy: matrix: include: @@ -26,19 +29,12 @@ jobs: - { 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/cancel-workflow-action@0.11.0 - 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 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 827606c0..707fb97d 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,6 +15,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -28,16 +31,8 @@ jobs: - { name: macos-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-latest } - { name: macos-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - 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 @@ -49,16 +44,24 @@ 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 + - name: Upload distribution as a workspace artifact if: ${{ matrix.upload-wheels }} uses: actions/upload-artifact@v4 @@ -72,24 +75,20 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded, python-ver: "3.13", os: ubuntu-latest } - - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest } - - { name: windows-gallery-python3.13-upgraded, test-tox-env: gallery-py313-upgraded, python-ver: "3.13", os: windows-latest } + - { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } + - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest } + - { name: windows-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: windows-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - 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 @@ -101,15 +100,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-tests-on-conda: name: ${{ matrix.name }} runs-on: ubuntu-latest defaults: run: shell: bash -l {0} + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -117,57 +121,57 @@ jobs: - { name: conda-linux-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - { name: conda-linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - 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 - auto-activate-base: true - activate-environment: true python-version: ${{ matrix.python-ver }} + channels: conda-forge - name: Install build dependencies run: | conda config --set always_yes yes --set changeps1 no conda info conda install -c conda-forge tox - conda list + + - name: Conda reporting + run: | + conda info + 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 }} + - 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 + deploy-dev: name: Deploy pre-release from dev needs: [run-tests, run-gallery-tests, run-tests-on-conda] if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - name: Checkout repo with submodules + - name: Checkout repo uses: actions/checkout@v4 - with: - submodules: 'recursive' - name: Set up Python uses: actions/setup-python@v5