@@ -49,14 +49,29 @@ jobs:
4949 post-cleanup : ' all'
5050 - name : additional setup
5151 run : pip install --no-deps -e .
52+ - name : Get Date
53+ id : get-date
54+ run : |
55+ echo "date=$(date +'%Y-%b')"
56+ echo "date=$(date +'%Y-%b')" >> $GITHUB_OUTPUT
57+ shell : bash
58+ - uses : actions/cache@v4
59+ with :
60+ path : bioimageio_cache
61+ key : " test-spec-conda-${{ steps.get-date.outputs.date }}"
5262 - name : pytest-spec-conda
5363 run : pytest --disable-pytest-warnings
64+ env :
65+ BIOIMAGEIO_CACHE_PATH : bioimageio_cache
5466
5567 test-spec-main :
5668 runs-on : ubuntu-latest
5769 strategy :
5870 matrix :
5971 python-version : ['3.8', '3.12']
72+ include :
73+ - python-version : ' 3.12'
74+ is-dev-version : true
6075 steps :
6176 - uses : actions/checkout@v4
6277 - name : Install Conda environment with Micromamba
@@ -83,35 +98,83 @@ jobs:
8398 pip install --no-deps git+https://github.com/bioimage-io/spec-bioimage-io
8499 - name : additional setup core
85100 run : pip install --no-deps -e .
101+ - name : Get Date
102+ id : get-date
103+ run : |
104+ echo "date=$(date +'%Y-%b')"
105+ echo "date=$(date +'%Y-%b')" >> $GITHUB_OUTPUT
106+ shell : bash
107+ - uses : actions/cache@v4
108+ with :
109+ path : bioimageio_cache
110+ key : " test-spec-main-${{ steps.get-date.outputs.date }}"
86111 - name : pytest-spec-main
87112 run : pytest --disable-pytest-warnings
88- - if : matrix.python-version == '3.12' && github.event_name == 'pull_request'
113+ env :
114+ BIOIMAGEIO_CACHE_PATH : bioimageio_cache
115+ - if : matrix.is-dev-version && github.event_name == 'pull_request'
8911690117 with :
91118 coverageFile : coverage.xml
92119 token : ${{ secrets.GITHUB_TOKEN }}
93- - if : matrix.python- version == '3.12' && github.ref == 'refs/heads/main'
120+ - if : matrix.is-dev- version && github.ref == 'refs/heads/main'
94121 run : |
95122 pip install genbadge[coverage]
96123 genbadge coverage --input-file coverage.xml --output-file ./dist/coverage/coverage-badge.svg
97124 coverage html -d dist/coverage
98- - if : matrix.python- version == '3.12' && github.ref == 'refs/heads/main'
125+ - if : matrix.is-dev- version && github.ref == 'refs/heads/main'
99126 uses : actions/upload-artifact@v4
100127 with :
101128 name : coverage
102129 retention-days : 1
103130 path : dist
104131
105132
106- test-tf :
133+ test-spec-main- tf :
107134 runs-on : ubuntu-latest
108135 strategy :
109136 matrix :
110- python-version : ['3.9', '3.11 ']
137+ python-version : ['3.9', '3.12 ']
111138 steps :
112139 - uses : actions/checkout@v4
113- - name : Install Conda environment with Micromamba
114- uses : mamba-org/setup-micromamba@v1
140+ - uses : mamba-org/setup-micromamba@v1
141+ with :
142+ cache-downloads : true
143+ cache-environment : true
144+ environment-file : dev/env-tf.yaml
145+ condarc : |
146+ channel-priority: flexible
147+ create-args : >-
148+ python=${{ matrix.python-version }}
149+ post-cleanup : ' all'
150+ - name : additional setup spec
151+ run : |
152+ conda remove --yes --force bioimageio.spec || true # allow failure for cached env
153+ pip install --no-deps git+https://github.com/bioimage-io/spec-bioimage-io
154+ - name : additional setup core
155+ run : pip install --no-deps -e .
156+ - name : Get Date
157+ id : get-date
158+ run : |
159+ echo "date=$(date +'%Y-%b')"
160+ echo "date=$(date +'%Y-%b')" >> $GITHUB_OUTPUT
161+ shell : bash
162+ - uses : actions/cache@v4
163+ with :
164+ path : bioimageio_cache
165+ key : " test-spec-main-tf-${{ steps.get-date.outputs.date }}"
166+ - run : pytest --disable-pytest-warnings
167+ env :
168+ BIOIMAGEIO_CACHE_PATH : bioimageio_cache
169+
170+ test-spec-conda-tf :
171+ runs-on : ubuntu-latest
172+ strategy :
173+ matrix :
174+ python-version : ['3.9', '3.12']
175+ steps :
176+ - uses : actions/checkout@v4
177+ - uses : mamba-org/setup-micromamba@v1
115178 with :
116179 cache-downloads : true
117180 cache-environment : true
@@ -123,8 +186,20 @@ jobs:
123186 post-cleanup : ' all'
124187 - name : additional setup
125188 run : pip install --no-deps -e .
189+ - name : Get Date
190+ id : get-date
191+ run : |
192+ echo "date=$(date +'%Y-%b')"
193+ echo "date=$(date +'%Y-%b')" >> $GITHUB_OUTPUT
194+ shell : bash
195+ - uses : actions/cache@v4
196+ with :
197+ path : bioimageio_cache
198+ key : " test-spec-conda-tf-${{ steps.get-date.outputs.date }}"
126199 - name : pytest-spec-tf
127200 run : pytest --disable-pytest-warnings
201+ env :
202+ BIOIMAGEIO_CACHE_PATH : bioimageio_cache
128203
129204 conda-build :
130205 runs-on : ubuntu-latest
@@ -164,20 +239,11 @@ jobs:
164239 path : dist
165240 - uses : actions/setup-python@v5
166241 with :
167- python-version : ' 3.12 '
242+ python-version : ' 3.13 '
168243 cache : ' pip'
169244 - run : pip install -e .[dev]
170- - id : get_version
171- run : python -c 'import bioimageio.core;print(f"version={bioimageio.core.__version__}")' >> $GITHUB_OUTPUT
172245 - name : Generate developer docs
173- run : |
174- pdoc \
175- --docformat google \
176- --logo https://bioimage.io/static/img/bioimage-io-logo.svg \
177- --logo-link https://bioimage.io/ \
178- --favicon https://bioimage.io/static/img/bioimage-io-icon-small.svg \
179- --footer-text 'bioimageio.core ${{steps.get_version.outputs.version}}' \
180- -o ./dist bioimageio.core
246+ run : ./scripts/pdoc/run.sh
181247 - run : cp README.md ./dist/README.md
182248 - name : copy rendered presentations
183249 run : |
0 commit comments