forked from statsmodels/statsmodels
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
124 lines (115 loc) · 3.63 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 flexability for choosing versions of
# required packages and is simpler to use to test up-to-date scientific Python
# stack
language: python
sudo: required
services:
- docker
before_install:
- docker pull ubuntu:14.04
env:
# Default values for common packages, override as needed
global:
- OPTIONAL=
- COVERAGE=false
- USEMPL=true
matrix:
fast_finish: true
include:
- python: 2.7
env:
- PYTHON=2.6
- dateutil=
- NUMPY="1.6.2=py26_4"
- SCIPY="0.11.0=np16py26_3"
- MATPLOTLIB=1.2
- python: 2.7
env:
- PYTHON=2.7
- dateutil=
- NUMPY=1.7
- SCIPY=0.12
- OPTIONAL="mkl mkl-rt libgfortran=1.0"
- COVERAGE=true
- python: 2.7
env:
- PYTHON=3.3
- dateutil=
- NUMPY=1.8
- SCIPY=0.13
- MATPLOTLIB=1.3
- PANDAS=0.13
- python: 2.7
env:
- PYTHON=3.4
- dateutil=
- NUMPY=1.9
- SCIPY=0.14
- PANDAS=0.14
- MATPLOTLIB=1.4
- OPTIONAL=libgfortran=1.0
- python: 2.7
env:
- PYTHON=2.7
- dateutil=
- NUMPY=
- SCIPY=
- USEMPL=false
- PANDAS=
- python: 2.7
env:
- PYTHON=3.5
- python-dateutil=
- NUMPY=
- SCIPY=
- PANDAS=
- MATPLOTLIB=1.4
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
- conda update --yes --quiet conda
# Fix for headless TravisCI
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
# Avoid noise from matplotlib
- mkdir $HOME/.config
- mkdir $HOME/.config/matplotlib
- SRCDIR=$PWD
- cp $SRCDIR/tools/matplotlibrc $HOME/.config/matplotlib/matplotlibrc
# Location for older version of matplotlib
- if [ ${MATPLOTLIB} = "1.2" ]; then mkdir $HOME/.matplotlib; fi
- if [ ${MATPLOTLIB} = "1.2" ]; then cp ${SRCDIR}/tools/matplotlibrc $HOME/.matplotlib/matplotlibrc; fi
# Build package list to avoid empty package=versions; only needed for versioned pacakges
- 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
# Install packages
install:
- conda create --yes --quiet -n statsmodels-test ${PKGS} ${OPTIONAL} nose pip pyyaml setuptools
- source activate statsmodels-test
- if [ ${COVERAGE} = true ]; then pip install coverage coveralls; fi
- python setup.py install
script:
- SRCDIR=$PWD
- python setup.py install
- mkdir -p "${SRCDIR}/travis-test"; cd "${SRCDIR}/travis-test"
# Show versions
- python -c 'import statsmodels.api as sm; sm.show_versions();'
# Compose a script to run testing with coverage
- echo 'import statsmodels as sm; a=sm.test(label="full", verbose=3); import sys; sys.exit((len(a.failures)+len(a.errors))>0)' > test.py
- if [ ${COVERAGE} = true ]; then coverage run --rcfile=${SRCDIR}/.travis_coveragerc test.py; else python test.py; fi
after_success:
# Coverage only for 2.7
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi