Skip to content

Commit 7cc9d4f

Browse files
committed
CI: Install test data
1 parent 28dcf26 commit 7cc9d4f

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,37 @@ jobs:
4040
name: dist
4141
path: dist/
4242

43+
get_data:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- name: Create test data directory
47+
run: mkdir -p $HOME/.cache/stanford-crn
48+
- name: Load test data cache
49+
uses: actions/cache@v2
50+
id: stanford-crn
51+
with:
52+
path: ~/.cache/stanford-crn/
53+
key: data-v0-${{ github.ref_name }}-${{ github.sha }}
54+
restore-keys: |
55+
data-v0-${{ github.ref_name }}-
56+
data-v0-
57+
- name: Install datalad
58+
run: |
59+
sudo apt-get update -y
60+
sudo apt-get install -y git-annex --no-install-recommends
61+
python -m pip install datalad==0.14.7 datalad-osf
62+
datalad wtf
63+
- name: Fetch test data
64+
run: |
65+
DS=$HOME/.cache/stanford-crn
66+
datalad install -r -s https://github.com/nipreps-data/niworkflows-data.git $DS
67+
cd $DS
68+
git -C BIDS-examples-1-enh-ds054 checkout enh/ds054
69+
datalad update -r --merge -d .
70+
datalad get -J 2 -r ds000003 ds000030/sub-10228/func
71+
4372
test:
44-
needs: [build]
73+
needs: [build, get_data]
4574
runs-on: ubuntu-latest
4675
strategy:
4776
matrix:
@@ -58,6 +87,12 @@ jobs:
5887
uses: actions/setup-python@v3
5988
with:
6089
python-version: ${{ matrix.python-version }}
90+
- name: Load test data cache
91+
uses: actions/cache@v2
92+
id: stanford-crn
93+
with:
94+
path: ~/.cache/stanford-crn/
95+
key: data-v0-${{ github.ref_name }}-${{ github.sha }}
6196
- name: Fetch packages
6297
uses: actions/download-artifact@v3
6398
with:

0 commit comments

Comments
 (0)