forked from netneurolab/netneurotools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
93 lines (85 loc) · 2.25 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
language: python
sudo: false
dist: xenial
notifications:
email: change
python:
- 3.6
- 3.7
env:
matrix:
- CHECK_TYPE=linting
- CHECK_TYPE=docdoctest
- CHECK_TYPE=test
- CHECK_TYPE=test INSTALL_NUMBA=true
global:
- INSTALL_TYPE=setup
matrix:
include:
- python: 3.6
env:
- INSTALL_TYPE=sdist
- CHECK_TYPE=test
- python: 3.6
env:
- INSTALL_TYPE=wheel
- CHECK_TYPE=test
- python: 3.6
env:
- INSTALL_TYPE=conda
- CHECK_TYPE=test
before_install:
- python -m pip install --upgrade pip
- if [ "${INSTALL_TYPE}" == "conda" ]; then
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
bash miniconda.sh -b -p $HOME/miniconda;
export PATH="$HOME/miniconda/bin:$PATH";
hash -r;
conda config --set always_yes yes --set changeps1 no;
conda update -q conda;
conda env create -f environment.yml;
source activate netneurotools;
fi
- if [ "${CHECK_TYPE}" == "linting" ]; then
pip install flake8;
fi
- if [ "${CHECK_TYPE}" == "test" ]; then
pip install "pytest>=3.6" pytest-cov coverage coveralls codecov;
fi
- if [ ! -z "${INSTALL_NUMBA}"]; then
pip install numba;
fi
install:
- |
if [ "${INSTALL_TYPE}" == "setup" ]; then
python setup.py install;
elif [ "${INSTALL_TYPE}" == "sdist" ]; then
python setup.py sdist;
pip install dist/*.tar.gz;
elif [ "${INSTALL_TYPE}" == "wheel" ]; then
python setup.py bdist_wheel;
pip install dist/*.whl;
elif [ "${INSTALL_TYPE}" == "conda" ]; then
pip install --no-deps .;
else
false;
fi
script:
- |
if [ "${CHECK_TYPE}" == "linting" ]; then
flake8 netneurotools;
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
cd docs;
pip install -r ./requirements.txt;
make html;
make doctest;
elif [ "${CHECK_TYPE}" == "test" ]; then
py.test --doctest-modules --cov-report term-missing --cov=netneurotools netneurotools;
else
false;
fi
after_success:
# codecov with numba installed doesn't make sense, so don't do that
- if [ "${CHECK_TYPE}" == "test" ] && [ -z "${INSTALL_NUMBA}" ]; then
coveralls; codecov;
fi