Skip to content

Commit

Permalink
test with py3.13 and for TF with spec-main
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Nov 18, 2024
1 parent e34ad21 commit e5deb74
Showing 1 changed file with 50 additions and 11 deletions.
61 changes: 50 additions & 11 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
Expand Down Expand Up @@ -68,7 +68,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.12']
python-version: ['3.8', '3.13']
include:
- python-version: '3.13'
is-dev-version: true
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
Expand Down Expand Up @@ -109,33 +112,69 @@ jobs:
run: pytest --disable-pytest-warnings
env:
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
- if: matrix.python-version == '3.12' && github.event_name == 'pull_request'
- if: matrix.is-dev-version && github.event_name == 'pull_request'
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
- if: matrix.python-version == '3.12' && github.ref == 'refs/heads/main'
- if: matrix.is-dev-version && github.ref == 'refs/heads/main'
run: |
pip install genbadge[coverage]
genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg
coverage html -d dist/coverage
- if: matrix.python-version == '3.12' && github.ref == 'refs/heads/main'
- if: matrix.is-dev-version && github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v4
with:
name: coverage
retention-days: 1
path: dist


test-tf:
test-spec-main-tf:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.11']
python-version: ['3.8', '3.13']
steps:
- uses: actions/checkout@v4
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@v1
- uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
environment-file: dev/env-tf.yaml
condarc: |
channel-priority: flexible
create-args: >-
python=${{ matrix.python-version }}
post-cleanup: 'all'
- name: additional setup spec
run: |
conda remove --yes --force bioimageio.spec || true # allow failure for cached env
pip install --no-deps git+https://github.com/bioimage-io/spec-bioimage-io
- name: additional setup core
run: pip install --no-deps -e .
- name: Get Date
id: get-date
run: |
echo "date=$(date +'%Y-%b')"
echo "date=$(date +'%Y-%b')" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/cache@v4
with:
path: bioimageio_cache
key: "test-spec-main-tf-${{ steps.get-date.outputs.date }}"
- run: pytest --disable-pytest-warnings
env:
BIOIMAGEIO_CACHE_PATH: bioimageio_cache

test-spec-conda-tf:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.13']
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
cache-downloads: true
cache-environment: true
Expand All @@ -156,7 +195,7 @@ jobs:
- uses: actions/cache@v4
with:
path: bioimageio_cache
key: "test-tf-${{ steps.get-date.outputs.date }}"
key: "test-spec-conda-tf-${{ steps.get-date.outputs.date }}"
- name: pytest-spec-tf
run: pytest --disable-pytest-warnings
env:
Expand Down Expand Up @@ -200,7 +239,7 @@ jobs:
path: dist
- uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
cache: 'pip'
- run: pip install -e .[dev]
- name: Generate developer docs
Expand Down

0 comments on commit e5deb74

Please sign in to comment.