-
Notifications
You must be signed in to change notification settings - Fork 35
170 lines (138 loc) · 5.16 KB
/
test_latest.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
---
name: test latest image
on:
schedule:
- cron: 0 0 1 * *
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -l {0}
jobs:
test_dataset_without_session:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree
- name: Clone repo
uses: actions/checkout@v3
- name: pull docker image
run: docker pull bids/freesurfer:latest
- name: add license
run: |
mkdir -p ~/license
echo "cHJpbnRmICJEeWxhbi5OaWVsc29uQGdtYWlsLmNvbVxuMzcwNjNcbiAqQ1lrZWhQYUNvRDlNXG4gRlM2N1BTWmRFV2lqb1xuIiA+IH4vbGljZW5zZS9saWNlbnNlLnR4dA==" | base64 -d | sh
- name: print version
run: |
docker run -t --rm --read-only \
bids/freesurfer:latest --version
docker run -t --rm --read-only \
bids/freesurfer:latest --help
- name: get data
run: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/utils/get_data_from_osf.sh
bash get_data_from_osf.sh ds114_test1
bash get_data_from_osf.sh ds114_test1_freesurfer_precomp_v6.0.0
- name: prepare output dir
run: |
mkdir -p ${HOME}/outputs1
- name: dataset with no session - participant 01
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test1:/bids_dataset \
-v ${HOME}/outputs1:/outputs \
-v ${HOME}/license/license.txt:/license.txt \
--tmpfs /tmp \
--tmpfs /var/tmp \
bids/freesurfer:latest \
/bids_dataset /outputs participant \
--participant_label 01 \
--license_file=/license.txt --stages autorecon1
cat ${HOME}/outputs1/sub-01/scripts/recon-all.done
- name: check output
run: tree ${HOME}/outputs1
- name: dataset with no session - group
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test1:/bids_dataset \
-v ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0:/outputs \
-v ${HOME}/license/license.txt:/license.txt \
--tmpfs /tmp \
--tmpfs /var/tmp \
bids/freesurfer \
/bids_dataset \
/outputs \
group2 \
--license_file=/license.txt
mkdir -p ${HOME}/outputs1_group/
sudo mv ${HOME}/data/ds114_test1_freesurfer_precomp_v6.0.0/00_group* ${HOME}/outputs1_group/
cat ${HOME}/outputs1_group/00_group2_stats_tables/lh.aparc.thickness.tsv
cat ${HOME}/outputs1_group/00_group2_stats_tables/euler.tsv
test_dataset_with_session:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree
- name: Clone repo
uses: actions/checkout@v3
- name: pull docker image
run: docker pull bids/freesurfer:latest
- name: add license
run: |
mkdir -p ~/license
echo "cHJpbnRmICJEeWxhbi5OaWVsc29uQGdtYWlsLmNvbVxuMzcwNjNcbiAqQ1lrZWhQYUNvRDlNXG4gRlM2N1BTWmRFV2lqb1xuIiA+IH4vbGljZW5zZS9saWNlbnNlLnR4dA==" | base64 -d | sh
- name: print version
run: |
docker run -t --rm --read-only \
bids/freesurfer:latest --version
docker run -t --rm --read-only \
bids/freesurfer:latest --help
- name: get data
run: |
wget https://raw.githubusercontent.com/bids-apps/maintenance-tools/main/utils/get_data_from_osf.sh
bash get_data_from_osf.sh ds114_test2
bash get_data_from_osf.sh ds114_test2_freesurfer_precomp_v6.0.0
- name: prepare output dir
run: |
mkdir -p ${HOME}/outputs2
- name: dataset with session - participant 01
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test2:/bids_dataset \
-v ${HOME}/outputs2:/outputs \
-v ${HOME}/license/license.txt:/license.txt \
--tmpfs /tmp \
--tmpfs /var/tmp \
bids/freesurfer:latest \
/bids_dataset /outputs participant \
--participant_label 01 \
--license_file=/license.txt \
--stages autorecon1 \
--steps cross-sectional \
--session_label test
cat ${HOME}/outputs2/sub-01_ses-test/scripts/recon-all.done
- name: check output
run: tree ${HOME}/outputs2
- name: dataset with session - group
run: |
docker run -t --rm --read-only \
-v ${HOME}/data/ds114_test2:/bids_dataset \
-v ${HOME}/data/ds114_test2_freesurfer_precomp_v6.0.0:/outputs \
-v ${HOME}/license/license.txt:/license.txt \
--tmpfs /tmp \
--tmpfs /var/tmp \
bids/freesurfer \
/bids_dataset \
/outputs \
group2 \
--license_file=/license.txt
mkdir -p ${HOME}/outputs2_group/
sudo mv ${HOME}/data/ds114_test2_freesurfer_precomp_v6.0.0/00_group* ${HOME}/outputs2_group/
cat ${HOME}/outputs2_group/00_group2_stats_tables/lh.aparc.thickness.tsv
cat ${HOME}/outputs2_group/00_group2_stats_tables/euler.tsv