forked from incf-nidash/nidmresults-fsl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
57 lines (57 loc) · 2.03 KB
/
.travis.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
language: python
# Enable Travis container-based infrastructure
cache:
pip: true
directories:
- test/data/nidmresults-examples
env:
global:
- CCACHE_COMPRESS=1
- CASHER_TIME_OUT=500
- NIDM_EX_BRANCH=master
python:
- "2.7"
- "3.5"
bundler_args: --retry 9
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install:
# Install FSL using Neurodebian
- bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
- sudo apt-get -y update
- sudo apt-get -y install fsl-complete
- source /etc/fsl/fsl.sh;
- export FSLOUTPUTTYPE=NIFTI_GZ
- cwd=`pwd`
# Download test data using git-lfs
- curl -sLo - https://github.com/github/git-lfs/releases/download/v1.4.1/git-lfs-linux-amd64-1.4.1.tar.gz | tar xzvf -
- export PATH=$PATH:`pwd`/git-lfs-1.4.1
- cd test/data/nidmresults-examples
# Is this is not a git repo them clone nidmresults-examples
- if ! [ -d .git ]; then git lfs clone https://github.com/incf-nidash/nidmresults-examples.git .; fi
- git fetch origin
- git lfs install
# Delete any previous changes (retry because lfs might download files)
- travis_retry git reset --hard origin/${NIDM_EX_BRANCH}
# A second time to allow for 3 more retries as "--retry 9" does not seem to be
# taken into account by Travis CI
- travis_retry git reset --hard origin/${NIDM_EX_BRANCH}
- cd ../../..
# Avoid "html5lib requires setuptools version 18.5" error
- pip install --upgrade setuptools
- pip install -r requirements.txt
- python setup.py install # install nidmfsl from sources
# Packages only needed for testing (others are set up in requirements.txt)
- pip install vcrpy
- pip install ddt
# command to run tests, e.g. python setup.py test
script:
# - coverage run --source=nidmfsl -m unittest discover
- python test/export_test_battery.py
- python -m unittest discover
# - cat debug.log
# Update subtree nidm from main nidm repository
before_install:
- git config --global user.name "TravisCI"
- git config --global user.email "travis@dummy.com"
# after_success:
# coveralls