forked from nipy/nibabel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
75 lines (75 loc) · 2.16 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# vim ft=yaml
# Multiple lines can be made a single "virtual line" because of how Travis
# munges each line before executing it to print out the exit status. It's okay
# for it to be on multiple physical lines, so long as you remember: - There
# can't be any leading "-"s - All newlines will be removed, so use ";"s
language: python
env:
global:
- DEPENDS="numpy scipy matplotlib h5py"
- PYDICOM=1
python:
- 2.6
- 3.2
- 3.3
- 3.4
matrix:
include:
- python: 2.7
env:
- COVERAGE=1
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS=numpy==1.5.1 PYDICOM=0
# Minimum pydicom dependency
- python: 2.7
env:
- DEPENDS="numpy==1.5.1 pydicom==0.9.7"
# Documentation doctests
- python: 2.7
env:
- DOC_DOC_TEST=1
before_install:
- virtualenv --python=python venv
- source venv/bin/activate
- python --version # just to check
- pip install nose # always
- pip install --no-index -f http://travis-wheels.scikit-image.org $DEPENDS
# pydicom <= 0.9.8 doesn't install on python 3
- if [ "${TRAVIS_PYTHON_VERSION:0:1}" == "2" ]; then
if [ "$PYDICOM" == "1" ]; then
pip install pydicom;
fi
fi
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
- if [[ $DEPENDS == *h5py* ]]; then
sudo apt-get install libhdf5-serial-dev;
fi
# command to install dependencies
install:
- python setup.py install
# Point to nibabel data directory
- export NIBABEL_DATA_DIR="$PWD/nibabel-data"
# command to run tests, e.g. python setup.py test
script:
# Change into an innocuous directory and find tests from installation
- mkdir for_testing
- cd for_testing
- if [ "${COVERAGE}" == "1" ]; then
cp ../.coveragerc .;
COVER_ARGS="--with-coverage --cover-package nibabel";
fi
- if [ "$DOC_DOC_TEST" == "1" ]; then
pip install sphinx;
cd ../doc;
make html;
make doctest;
else
nosetests --with-doctest $COVER_ARGS nibabel;
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi