forked from miykael/atlasreader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
47 lines (41 loc) · 1.03 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
language: python
sudo: false
dist: xenial
python:
- 3.6
- 3.7
env:
- STYLE=1
- COVERAGE=1
- NOTEBOOKS=1
before_install:
- python -m pip install --upgrade pip
- pip install --upgrade virtualenv
- if [ "${STYLE}" == "1" ]; then
pip install flake8;
fi
- if [ "${COVERAGE}" == "1" ]; then
pip install coverage coveralls codecov pytest==4.1 pytest-cov;
fi
- if [ "${NOTEBOOKS}" == "1" ]; then
pip install pytest jupyter nbval;
fi
install:
- python setup.py install
script:
- |
if [ "${STYLE}" == "1" ]; then
flake8 atlasreader
elif [ "${COVERAGE}" == "1" ]; then
TEST_ARGS="--cov-report term-missing --cov=atlasreader";
py.test ${TEST_ARGS} atlasreader;
elif [ "${NOTEBOOKS}" == "1" ]; then
for n in `ls notebooks/*ipynb`
do
pytest --nbval-lax -v -s ${n};
done
fi
after_success:
- if [ "${COVERAGE}" == "1" ]; then
coveralls; codecov;
fi