forked from netneurolab/pypyls
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
92 lines (84 loc) · 1.89 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
branches:
only:
- master
python:
- 3.5
- 3.6
- 3.7
env:
matrix:
- CHECK_TYPE=linting
- CHECK_TYPE=docdoctest INSTALL_PANDAS=true
- CHECK_TYPE=test
global:
- OPENBLAS_NUM_THREADS=1
- MKL_NUM_THREADS=1
- 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_JOBLIB=true
- INSTALL_PANDAS=true
- CHECK_TYPE=test
before_install:
- python -m pip install --upgrade pip
- 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_JOBLIB}" ]; then
pip install joblib;
fi
- if [ ! -z "${INSTALL_PANDAS}" ]; then
pip install pandas;
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;
else
false;
fi
script:
- |
if [ "${CHECK_TYPE}" == "linting" ]; then
flake8 pyls;
elif [ "${CHECK_TYPE}" == "docdoctest" ]; then
cd docs;
pip install -r ./requirements.txt;
make html;
make doctest;
elif [ "${CHECK_TYPE}" == "test" ]; then
mkdir for_testing && cd for_testing;
cp ../setup.cfg .;
args="--cov-report term-missing --cov=pyls --doctest-modules --pyargs";
python -m pytest ${args} pyls;
else
false;
fi
after_success:
- if [ "${CHECK_TYPE}" == "test" ]; then
codecov;
fi