Skip to content

Commit 5133ec0

Browse files
committed
Cache RosettaSciIO test data
1 parent 22cabca commit 5133ec0

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ jobs:
274274
275275
- name: Check latest available hyperspy version
276276
run: |
277-
conda activate "${{ env.install_dir }}"
277+
conda activate "${{ env.install_dir }}"
278278
python check_hyperspy_latest.py
279279
280280
- name: Install xvfb
@@ -293,6 +293,23 @@ jobs:
293293
conda activate "${{ env.install_dir }}"
294294
mamba install ${{ env.TEST_DEPS }}
295295
296+
- name: Get rosettasciio tests data location
297+
run: |
298+
conda activate "${{ env.install_dir }}"
299+
python -c "from rsciio.tests import registry; print(f'ROSETTASCIIO_TEST_DATA={str(registry.TESTS_PATH / \"data\") }')" >> $GITHUB_ENV
300+
301+
- name: Cache rosettasciio data
302+
uses: actions/cache@v4
303+
env:
304+
# Increase this value to reset cache
305+
CACHE_NUMBER: 0
306+
with:
307+
path: ${{ env.ROSETTASCIIO_TEST_DATA }}
308+
key:
309+
RosettaSciIO-test_data-${{ env.CACHE_NUMBER }}
310+
restore-keys: |
311+
RosettaSciIO-test_data-${{ env.CACHE_NUMBER }}
312+
296313
- if: always()
297314
name: Test new distribution (HyperSpyUI)
298315
run: |

0 commit comments

Comments
 (0)