-
Notifications
You must be signed in to change notification settings - Fork 22
/
.travis.yml
109 lines (103 loc) · 3 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
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
language: python
env:
global:
- DEPENDS="numpy nibabel"
- INSTALL_TYPE="pip"
- EXTRA_WHEELS="https://5cf40426d9f06eb7461d-6fe47d9331aba7cd62fc36c7196769e4.ssl.cf2.rackcdn.com"
- EXTRA_PIP_FLAGS="--find-links=$EXTRA_WHEELS"
python:
- 3.4
- 3.5
- 3.6
matrix:
include:
# - python: 2.7
# env:
# - COVERAGE=1
# - DOCTESTS=1
# - DOC_DOCTEST=1
# Absolute minimum dependencies
- python: 2.7
env:
- DEPENDS="numpy==1.12.1 nibabel==2.1.0"
- python: 2.7
env:
- INSTALL_TYPE=pipe
- python: 2.7
env:
- INSTALL_TYPE=setup
- python: 2.7
env:
- INSTALL_TYPE=sdist
- python: 2.7
env:
- DEPENDS=
- INSTALL_TYPE=wheel
- python: 2.7
env:
- DEPENDS=
- INSTALL_TYPE=requirements
before_install:
- python -m pip install --upgrade pip
- pip install --upgrade virtualenv
- virtualenv --python=python venv
- python --version # just to check
- source venv/bin/activate
- pip install nose
- if [ -n "$DEPENDS" ]; then
pip install $EXTRA_PIP_FLAGS $DEPENDS;
fi;
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
- if [ "${DOC_DOCTEST}" == "1" ]; then
pip install sphinx;
fi
install:
- |
if [ "$INSTALL_TYPE" == "pip" ]; then
pip install .
elif [ "$INSTALL_TYPE" == "pipe" ]; then
pip install -e .
elif [ "$INSTALL_TYPE" == "setup" ]; then
python setup.py install
elif [ "$INSTALL_TYPE" == "sdist" ]; then
python setup.py egg_info # check egg_info while we're here
python setup.py sdist
pip install $EXTRA_PIP_FLAGS dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup.py bdist_wheel
pip install $EXTRA_PIP_FLAGS dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
pip install $EXTRA_PIP_FLAGS -r requirements.txt
pip install .
fi
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 -I=.coveragerc";
fi
- DOCTEST_ARGS=""
- if [ "${DOCTESTS}" == "1" ]; then
DOCTEST_ARGS="--with-doctest";
fi
- nosetests $COVER_ARGS $DOCTEST_ARGS ../test
- if [ "${DOC_DOCTEST}" == "1" ]; then
cd ../docs ;
sphinx-build -b html . _build/html ;
fi
after_success:
# - if [ "${COVERAGE}" == "1" ]; then coveralls; fi
# coverage stats disentagled from web services and moved to
# local cover/index.html
# - nosetests --with-coverage --cover-package=bruker2nifti --cover-erase --cover-html
# - open cover/index.html
# run
# nosetests --with-coverage --cover-package=bruker2nifti &> nose_coverage.txt
notifications:
email: false