-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
executable file
·78 lines (71 loc) · 1.71 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
language: python
sudo: false
dist: bionic
services:
- xvfb
notifications:
email: change
python:
- 3.6
- 3.7
env:
matrix:
- CHECK_TYPE=linting
- CHECK_TYPE=docdoctest
- CHECK_TYPE=test
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
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 wget;
fi
- if [ "${CHECK_TYPE}" == "docdoctest" ]; then
pip install "sphinx>2.0" sphinx_rtd_theme pandas sphinx-argparse;
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 physutils;
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="--doctest-modules --cov-report term-missing --cov=physutils --pyargs"
python -m pytest ${args} physutils;
else
false;
fi
after_success:
- if [ "${CHECK_TYPE}" == "test" ]; then
coveralls; codecov;
fi