forked from automaticanalysis/automaticanalysis
-
Notifications
You must be signed in to change notification settings - Fork 4
180 lines (152 loc) · 5.55 KB
/
aa_unittest.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
171
172
173
174
175
176
177
178
179
180
# This is a basic workflow to help you get started with Actions
name: Non-Use case tests
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Default settings
defaults:
run:
shell: bash
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
not_large:
name: Run all tests that do NOT have the Large tag
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Create test space
run: |
sudo mkdir /test
sudo chown runner: /test
sudo chmod u+w /test
echo "Free space:"
df -h
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v3
- name: Set up Python 3.6
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.6'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
# MATLAB release to set up R2020a
release: R2020a
- name: Install tools and configure aa
run: |
python trigger_install.py
working-directory: ${{github.workspace}}/.github/workflows
env:
LOAD_FSL: 0
LOAD_FREESURFER: 0
PARAMETER_XML: aap_parameters_defaults_GitHub.xml
- name: Run script
uses: matlab-actions/run-command@v1
with:
command: addpath(getenv('GITHUB_WORKSPACE')); aa_ver5; SPM = spmClass(fullfile('/test','tools','spm12')); SPM.load; aa_test('haltonerror', true, 'not_tags', {'Large'}); aa_test_getreport('/test/projects','/test/projects/report')
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
- name: Archive data
uses: actions/upload-artifact@v3
with:
name: data_${{github.job}}
path: |
/test/projects/report/
- name: Archive log
uses: actions/upload-artifact@v3
with:
name: testlog_${{github.job}}
path: |
${{github.workspace}}/developer/aa_test.log
tutorial_minimal:
# Since aa states that the minimal tools needed are only aa and spm, and at least some of the
# examples should work correctly with just those installed.
name: Run all tutorial tests with only a minimal parameter xml / tools install
# The type of runner that the job will run on
runs-on: ubuntu-20.04
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Create test space
run: |
sudo mkdir /test
sudo chown runner: /test
sudo chmod u+w /test
echo "Free space:"
df -h
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository under $GITHUB_WORKSPACE
uses: actions/checkout@v3
- name: Set up Python 3.6
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.6'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
# MATLAB release to set up R2020a
release: R2020a
- name: Install tools and configure aa
run: |
python trigger_install.py
working-directory: ${{github.workspace}}/.github/workflows
env:
# Do not even install the FSL standards
LOAD_FSL: 0
LOAD_FREESURFER: 0
PARAMETER_XML: aap_parameters_defaults_GitHub_minimal.xml
- name: Run script
uses: matlab-actions/run-command@v1
with:
command: addpath(getenv('GITHUB_WORKSPACE')); aa_ver5; SPM = spmClass(fullfile('/test','tools','spm12')); SPM.load; aa_test('haltonerror', true, 'tags', {'Minimal_install'}); aa_test_getreport('/test/projects','/test/projects/report')
- name: Archive data
uses: actions/upload-artifact@v3
with:
name: data_${{github.job}}
path: |
/test/projects/report/
- name: Archive log
uses: actions/upload-artifact@v3
with:
name: testlog_${{github.job}}
path: |
${{github.workspace}}/developer/aa_test.log