forked from bashtage/arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
106 lines (97 loc) · 3.14 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
# 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
sudo: false
language: python
env:
# Default values for common packages, override as needed
global:
- CYTHON=0.20
- PATSY=
- OPTIONAL=
- STATSMODELS=
- NUMBA=
- COVERAGE=true
matrix:
fast_finish: true
include:
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.7
- SCIPY=0.12
- MATPLOTLIB=1.3
- PANDAS=0.12
- python: 2.7
env:
- PYTHON=2.7
- NUMPY=1.8.2
- python: 2.7
env:
- PYTHON=2.7
- NUMBA=0.20
- COVERAGE=false
- python: 2.7
env:
- PYTHON=3.3
- NUMPY=1.9
- SCIPY=0.14
- NUMBA=0.15
- MATPLOTLIB=1.4
- COVERAGE=false
- python: 2.7
env:
- PYTHON=3.4
- NUMPY=1.9
- SCIPY=0.15
- NUMBA=0.19
- MATPLOTLIB=1.4
addons:
apt:
packages:
- pandoc
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
- 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
# Location for older version of matplotlib
- if [ ${MATPLOTLIB} = "1.2" ]; then mkdir $HOME/.matplotlib; 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
- PKGS="${PKGS} matplotlib"; if [ ${MATPLOTLIB} ]; then PKGS="${PKGS}=${MATPLOTLIB}"; fi
- PKGS="${PKGS} statsmodels"; if [ ${STATSMODELS} ]; then PKGS="${PKGS}=${STATSMODELS}"; fi
- if [ ${NUMBA} ]; then PKGS="${PKGS} numba=${NUMBA}"; fi
# Install packages
install:
- conda create --yes --quiet -n arch-test ${PKGS} ${OPTIONAL} ipython-notebook statsmodels dateutil nose pip pyyaml setuptools pyqt pyparsing
- source activate arch-test
- if [ ${COVERAGE} = true ]; then pip install coverage coveralls nose-cov; fi
- python setup.py build
script:
- SRCDIR=$PWD
- python setup.py install
# Show versions
- mkdir -p "${SRCDIR}/travis-test"; cd "${SRCDIR}/travis-test"
- python -c 'import statsmodels.api as sm; sm.show_versions();'
- echo 'import arch; a=arch.test(); 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:
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi