Skip to content

Commit 820e3c2

Browse files
committed
improve caching
1 parent 5bb0d6f commit 820e3c2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/build.yaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,15 @@ jobs:
8585
spec: main
8686
run-expensive-tests: true
8787
report-coverage: true
88+
save-cache: true
8889
- python-version: '3.12'
8990
conda-env: dev
9091
spec: conda
9192
- python-version: '3.13'
9293
conda-env: dev
9394
spec: main
95+
save-cache: true
96+
9497
steps:
9598
- uses: actions/checkout@v4
9699
- id: setup
@@ -160,13 +163,18 @@ jobs:
160163
id: bioimageio-cache
161164
with:
162165
path: bioimageio_cache
163-
key: ${{needs.populate-cache.outputs.cache-key}}
164-
fail-on-cache-miss: true
166+
key: ${{needs.populate-cache.outputs.cache-key}}${{matrix.run-expensive-tests && '' || '-light'}}
165167
- name: pytest
166168
run: pytest --disable-pytest-warnings
167169
env:
168170
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
169171
RUN_EXPENSIVE_TESTS: ${{ matrix.run-expensive-tests && 'true' || 'false' }}
172+
- name: Save updated bioimageio cache
173+
if: matrix.save-cache
174+
uses: actions/cache/save@v4
175+
with:
176+
path: bioimageio_cache
177+
key: ${{needs.populate-cache.outputs.cache-key}}${{matrix.run-expensive-tests && '' || '-light'}}
170178
- if: matrix.report-coverage && github.event_name == 'pull_request'
171179
uses: orgoro/[email protected]
172180
with:

0 commit comments

Comments
 (0)