-
Notifications
You must be signed in to change notification settings - Fork 20
/
.travis.yml
99 lines (91 loc) · 2.54 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
language: python
cache:
directories:
- $HOME/.cache/pip
env:
global:
- DEPENDS="numpy"
- INSTALL_TYPE="setup"
- MANYLINUX_URL=https://nipy.bic.berkeley.edu/manylinux
python:
- 3.3
- 3.4
- 3.5
matrix:
include:
- python: 2.6
env:
# Last networkx version that runs on 2.6
- NETWORKX_VER_SPEC="==1.9"
- python: 2.7
env:
- COVERAGE=1
- DOCTESTS=1
- DOC_DOCTEST=1
# Absolute minimum dependencies
- python: 2.7
env:
# Check numpy minimum version in datarray/version.py
- DEPENDS="numpy==1.7.0"
- python: 2.7
env:
- INSTALL_TYPE=sdist
- python: 2.7
env:
- INSTALL_TYPE=wheel
- python: 2.7
env:
- INSTALL_TYPE=requirements
# test against pre-release builds
- python: 3.5
env:
- EXTRA_PIP_FLAGS="--pre"
before_install:
- virtualenv --python=python venv
- source venv/bin/activate
- pip install -U pip wheel
- pip install -f $MANYLINUX_URL $EXTRA_PIP_FLAGS $DEPENDS
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage;
pip install coveralls;
fi
install:
- |
if [ "$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 -f $MANYLINUX_URL dist/*.tar.gz
elif [ "$INSTALL_TYPE" == "wheel" ]; then
pip install wheel
python setup.py bdist_wheel
pip install -f $MANYLINUX_URL dist/*.whl
elif [ "$INSTALL_TYPE" == "requirements" ]; then
pip install -f $MANYLINUX_URL -r requirements.txt
python setup.py install
fi
script:
- pip install nose
# 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 datarray";
fi
- if [ "${DOCTESTS}" == "1" ]; then
DOCTEST_ARGS="--with-doctest";
fi
# Run unit tests
- nosetests $COVER_ARGS $DOCTEST_ARGS datarray
# Run example to check for errors
- pip install networkx${NETWORKX_VER_SPEC}
- python ../examples/inference_algs.py
# Run doc doctests
- if [ "${DOC_DOCTEST}" == "1" ]; then
pip install sphinx;
(cd ../doc && make doctest);
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then coveralls; fi