-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
72 lines (71 loc) · 1.96 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
language: python
os: linux
dist: xenial
matrix:
include:
- env:
- PYTHON=3.8
- CODE_TEST=1
- COVERAGE=1
- DOC_TEST=0
- STYLE_TEST=0
- env:
- PYTHON=3.8
- CODE_TEST=0
- COVERAGE=0
- DOC_TEST=1
- STYLE_TEST=0
- env:
- PYTHON=3.8
- CODE_TEST=0
- COVERAGE=0
- DOC_TEST=0
- STYLE_TEST=1
install:
# install conda
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- . $HOME/miniconda/etc/profile.d/conda.sh
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
# create test environment
- conda create -q -n test-environment
- conda activate test-environment
- conda config --env --add channels conda-forge
# install needed packages
- conda install -q python=$PYTHON
- conda install -q numpy>=1.15
- conda install -q scipy
- conda install -q scikit-sparse
- if [ "${CODE_TEST}" == "1" ]; then
conda install -q nose;
conda install -q pytest;
if [ "${COVERAGE}" == "1" ]; then
conda install -q pytest-cov;
conda install -q codecov;
fi
fi
- if [ "${STYLE_TEST}" == "1" ]; then
conda install -q pycodestyle;
fi
- if [ "${DOC_TEST}" == "1" ]; then
conda install -q sphinx;
fi
- conda list
# install this package
- python3 setup.py install
script:
- if [ "${CODE_TEST}" == "1" ]; then
if [ "${COVERAGE}" == "1" ]; then
pytest -W error --cov=matrix && codecov;
else
pytest -W error;
fi
fi
- if [ "${DOC_TEST}" == "1" ]; then
sphinx-build -nW -b html -a doc/source doc/build/html;
fi
- if [ "${STYLE_TEST}" == "1" ]; then
pycodestyle . --exclude=versioneer.py;
fi