22# This will only work on your repo if you have an account on travis and you
33# have set it up to run continuous integration on this this repo
44
5- # Linux distribution (bionic beaver)
65dist : bionic
76
8- # Language and version
9- language : python
10- python :
11- - " 3.6" # current default Python on Travis CI
7+ language : node_js
8+ node_js :
9+ - " 10"
1210
1311cache :
14- apt : true # only works with Pro version
12+ apt : true
13+ directories :
14+ - node_modules
15+
16+ # only run the CI for those branches
17+ branches :
18+ only :
19+ - master
20+ - dev
1521
1622env :
1723 global :
1824 - OCTFLAGS="--no-gui --no-window-system --silent"
1925
20- before_install :
26+ # TODO maybe this could be refactored as this is not needed to check the
27+ # the markdown linting
28+ install :
2129 # install octave
2230 - travis_retry sudo apt-get -y -qq update
2331 - travis_retry sudo apt-get -y install octave
2432 - travis_retry sudo apt-get -y install liboctave-dev
25- # install MOX unit
26- - git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
27- - cd MOxUnit
28- - make install
29- - cd ..
30- # install MOcov
31- - git clone https://github.com/MOcov/MOcov.git --depth 1
32- - cd MOcov
33- - make install
34- - cd ..
33+
3534 # install SPM and the relevant patches for octave
3635 - git clone https://github.com/spm/spm12.git --depth 1
3736 - make -C spm12/src PLATFORM=octave distclean
3837 - make -C spm12/src PLATFORM=octave
3938 - make -C spm12/src PLATFORM=octave install
4039
41- script :
42- - octave $OCTFLAGS --eval "runTests"
43- - cat test_report.log | grep 0
40+ # update octave path
41+ - octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'lib'))); savepath();"
42+ - octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
43+ - octave $OCTFLAGS --eval "addpath(fullfile(pwd, 'spm12')); savepath();"
44+
45+ jobs :
46+ include :
47+
48+ # -------------------------------------------------------------------------
49+ # first job
50+ # -------------------------------------------------------------------------
51+ - name : " Unit tests and coverage"
52+
53+ before_script :
54+
55+ # install MOX unit
56+ - git clone https://github.com/MOxUnit/MOxUnit.git --depth 1
57+ - cd MOxUnit
58+ - make install
59+ - cd ..
60+
61+ # install MOcov
62+ - git clone https://github.com/MOcov/MOcov.git --depth 1
63+ - cd MOcov
64+ - make install
65+ - cd ..
66+
67+ # get data
68+ - output_folder='demos/MoAE/output/'
69+ - mkdir $output_folder
70+ - curl http://www.fil.ion.ucl.ac.uk/spm/download/data/MoAEpilot/MoAEpilot.bids.zip --output $output_folder'MoAEpilot.zip'
71+ - unzip $output_folder'MoAEpilot.zip' -d $output_folder
72+
73+ script :
74+ - octave $OCTFLAGS --eval "runTests"
75+ - cat test_report.log | grep 0
76+
77+ # to send the results to codecov to get our code coverage
78+ after_success :
79+ - bash <(curl -s https://codecov.io/bash)
80+
81+ # -------------------------------------------------------------------------
82+ # second job
83+ # -------------------------------------------------------------------------
84+ - name : " Check markdown"
85+
86+ before_script :
87+ # install node.js dependencies
88+ - npm install `cat npm-requirements.txt`
89+
90+ script :
91+ - remark *.md --frail
92+ - remark ./demos/ --frail
93+ - remark ./docs/ --frail
94+ - remark ./tests/ --frail
4495
45- after_success :
46- - bash <(curl -s https://codecov.io/bash)
96+ # -------------------------------------------------------------------------
97+ # third job
98+ # -------------------------------------------------------------------------
99+ - name : " Run demo"
47100
101+ if : branch = master
48102
103+ script :
104+ - cd demos/MoAE
105+ - octave $OCTFLAGS --eval "MoAEpilot_run"
0 commit comments