Skip to content

Commit d8ae791

Browse files
authored
Merge pull request #111 from jhlegarreta/RefactorDataDownloadNotebokCI
TST: Download data from G-Node GIN in notebook testing GHA workflow
2 parents d198315 + d6cdef9 commit d8ae791

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

.github/workflows/notebooks.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,27 @@ on:
66
# Allow job to be triggered manually from GitHub interface
77
workflow_dispatch:
88

9+
defaults:
10+
run:
11+
shell: bash
12+
13+
# Force tox and pytest to use color
14+
env:
15+
FORCE_COLOR: true
16+
TEST_DATA_HOME: /home/runner/nifreeze-tests/
17+
NIFREEZE_WERRORS: 1
18+
TEST_DATA_REPO: https://gin.g-node.org/nipreps-data/tests-nifreeze
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.ref }}
22+
cancel-in-progress: true
23+
24+
permissions:
25+
contents: read
26+
927
jobs:
1028
run-notebooks:
11-
runs-on: ubuntu-latest
29+
runs-on: 'ubuntu-latest'
1230

1331
strategy:
1432
matrix:
@@ -23,6 +41,11 @@ jobs:
2341
with:
2442
python-version: ${{ matrix.python-version }}
2543

44+
- name: Download data file from G-Node GIN
45+
run: |
46+
mkdir ${TEST_DATA_HOME}
47+
curl -L -o "${TEST_DATA_HOME}/hcpdata.npz" https://gin.g-node.org/nipreps-data/tests-nifreeze/src/master/hcpdata.npz
48+
2649
- name: Install TeX Live
2750
run: |
2851
sudo apt-get update
@@ -46,11 +69,9 @@ jobs:
4669
python -m pip install --upgrade pip
4770
pip install tox
4871
49-
- name: Download data
72+
- name: Download data from OpenNeuro
5073
run: |
51-
DATA_PATH="${{ env.TEST_DATA_HOME || github.workspace }}/nifreeze-tests"
52-
mkdir -p "$DATA_PATH"
53-
bash scripts/fetch_fmri_nb_openneuro_data.sh "$DATA_PATH"
74+
${{ github.workspace }}/scripts/fetch_fmri_nb_openneuro_data.sh "${TEST_DATA_HOME}"
5475
5576
- name: Run notebooks with tox
5677
run: tox -e notebooks

0 commit comments

Comments
 (0)