forked from weikanggong/snfpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
67 lines (60 loc) · 1.19 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
language: python
sudo: false
notifications:
email: change
python:
- 3.5
- 3.6
env:
global:
- OPENBLAS_NUM_THREADS=1
- MKL_NUM_THREADS=1
- COVERAGE=0
matrix:
- LINTING=1
- DOCTEST=1
matrix:
include:
- python: 3.6
env:
- COVERAGE=1
- python: 3.7
dist: xenial
- python: 3.7
dist: xenial
env:
- DOCTEST=1
before_install:
- python -m pip install --upgrade pip
- if [ "${LINTING}" == "1" ]; then
pip install flake8;
fi
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage coveralls codecov;
fi
install:
- if [ "${DOCTEST}" == "1" ]; then
pip install -e .[doc,tests];
else
pip install -e .[tests];
fi
script:
- |
if [ "${LINTING}" == "1" ]; then
flake8 snf;
else
if [ "${DOCTEST}" == "1" ]; then
cd docs;
make html;
make doctest;
cd ..;
fi
if [ "${COVERAGE}" == "1" ]; then
TEST_ARGS="--cov-report term-missing --cov=snf";
fi
py.test ${TEST_ARGS} snf;
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then
coveralls; codecov;
fi