forked from statsmodels/statsmodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (117 loc) · 3.76 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Travis script that uses miniconda in place of the system installed python
# versions. Allows substantial flexibility for choosing versions of
# required packages and is simpler to use to test up-to-date scientific Python
# stack
dist: trusty
sudo: required
language: python
env:
# Default values for common packages, override as needed
global:
- OPTIONAL=
- COVERAGE=false
- USEMPL=true
- MATPLOTLIB=
- DOCBUILD=false
matrix:
fast_finish: true
include:
- python: 2.7
env:
- PYTHON=3.6
- COVERAGE=true
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.11
- MATPLOTLIB=1.5
- COVERAGE=true
- python: 2.7
env:
- PYTHON=3.5
- NUMPY=1.10
- SCIPY=0.17
- PANDAS=0.18
- MATPLOTLIB=1.5
- python: 2.7
env:
- PYTHON=3.4
- NUMPY=1.10
- SCIPY=0.16
- PANDAS=0.16
- MATPLOTLIB=1.4
- OPTIONAL="libgfortran=1.0"
- python: 2.7
env:
- PYTHON=3.6
- DOCBUILD=true
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.9
- SCIPY=0.15
- PANDAS=0.15
- USEMPL=false
- OPTIONAL="libgfortran=1.0"
- python: 2.7
env:
- PYTHON=3.3
- NUMPY=1.9
- SCIPY=0.14
- MATPLOTLIB=1.4
- PANDAS=0.14
notifications:
email:
on_success: always
# Setup anaconda
before_install:
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda/bin:$PATH
- export PATH=/home/travis/miniconda2/bin:$PATH
- export MKL_NUM_THREADS=1
- export NUMEXPR_NUM_THREADS=1
- export OMP_NUM_THREADS=1
- conda config --set always_yes yes
# Temporarily disabled until conda is fixed
# - conda update --quiet conda
# Fix for headless TravisCI
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# Avoid noise from matplotlib
- mkdir -p $HOME/.config/matplotlib
- SRCDIR=$PWD
# Build package list to avoid empty package=versions; only needed for versioned packages
- PKGS="python=${PYTHON}"
- PKGS="${PKGS} numpy"; if [ ${NUMPY} ]; then PKGS="${PKGS}=${NUMPY}"; fi
- PKGS="${PKGS} scipy"; if [ ${SCIPY} ]; then PKGS="${PKGS}=${SCIPY}"; fi
- PKGS="${PKGS} patsy"; if [ ${PATSY} ]; then PKGS="${PKGS}=${PATSY}"; fi
- PKGS="${PKGS} pandas"; if [ ${PANDAS} ]; then PKGS="${PKGS}=${PANDAS}"; fi
- PKGS="${PKGS} Cython"; if [ ${CYTHON} ]; then PKGS="${PKGS}=${CYTHON}"; fi
- if [ ${USEMPL} = true ]; then PKGS="${PKGS} matplotlib"; if [ ${MATPLOTLIB} ]; then PKGS="${PKGS}=${MATPLOTLIB}"; fi; fi
- if [ ${COVERAGE} = true ]; then export COVERAGE_OPTS=" --cov-config=.travis_coveragerc --cov=statsmodels "; else export COVERAGE_OPTS=""; fi
- echo conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} pyyaml
- conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} pyyaml joblib
- source activate statsmodels-test
- pip install 'pytest<4' pytest-xdist nose
- if [ ${COVERAGE} = true ]; then pip install codecov coverage coveralls pytest-cov; fi
- if [ ${DOCBUILD} = true ]; then bash tools/ci_docbuild_install.sh; fi;
- export SRCDIR=$PWD
# Ensure tests are correctly gathered by xdist
- export PYTHONHASHSEED=0
# Install packages
install:
- python setup.py build_ext --inplace
- python setup.py develop
script:
# Show versions
- python -c 'import statsmodels.api as sm; sm.show_versions();'
# docbuild and exit, if required
- if [ ${DOCBUILD} = true ]; then cd ${SRCDIR}/docs; bash ${SRCDIR}/tools/ci_docbuild.sh; exit 0; fi;
# Run tests
- echo pytest -n 2 ${COVERAGE_OPTS} statsmodels --skip-examples
- pytest ${COVERAGE_OPTS} statsmodels --skip-examples
after_success:
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi
- if [ ${COVERAGE} = true ]; then codecov; fi