-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (40 loc) · 1.31 KB
/
setup-data.yml
File metadata and controls
52 lines (40 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Setup Data
on:
workflow_call:
# This makes this workflow reusable by others
jobs:
download-and-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
# 1. ATTEMPT TO RESTORE FROM CACHE
- name: Restore cached data
id: cache-data
uses: actions/cache@v5
with:
path: data/ # The folder you want to cache
# The key determines if we have a match.
# Change 'v1' to 'v2' manually to force a re-download in the future.
key: test-data-v7
# 2. DOWNLOAD ONLY IF CACHE MISS
- name: Set up Python 3.12
if: steps.cache-data.outputs.cache-hit != 'true'
uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install mritk
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
python3 -m pip install -e .
- name: Download test data
if: steps.cache-data.outputs.cache-hit != 'true'
run: |
python3 -m mritk datasets download test-data -o data
- name: Upload Data Artifact
uses: actions/upload-artifact@v7
with:
name: shared-test-data
path: data/ # The folder you want to share
retention-days: 1
overwrite: true