Revision b97c72cc081dd9a399cc0136a2763c09af19fa44 authored by Kevin Sheppard on 03 August 2016, 16:28:53 UTC, committed by GitHub on 03 August 2016, 16:28:53 UTC
TST: Switch to using py.test
.travis.yml
# 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=
- PATSY=
- OPTIONAL=
- NUMBA=
- COVERAGE=false
- USE_NUMBA=true
- STATSMODELS_MASTER=false
matrix:
fast_finish: true
include:
- python: 2.7
env:
- PYTHON=2.7
- MATPLOTLIB=1.3
- NUMPY=1.8.2
- USE_NUMBA=false
- PANDAS=0.14
- python: 2.7
env:
- PYTHON=2.7
- NUMBA=0.21
- NUMPY=1.10
- SCIPY=0.16
- MATPLOTLIB=1.5
- PANDAS=0.16
- python: 2.7
env:
- PYTHON=3.4
- NUMPY=1.9
- SCIPY=0.15
- NUMBA=0.24
- MATPLOTLIB=1.4
- PANDAS=0.17
- COVERAGE=true
- python: 2.7
env:
- PYTHON=3.5
- STATSMODELS_MASTER=true
- COVERAGE=true
addons:
apt:
packages:
- pandoc
# 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
# 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 [ ${USE_NUMBA} = true ]; then PKGS="${PKGS} numba"; if [ ${NUMBA} ]; then PKGS="${PKGS}=${NUMBA}"; fi; fi;
# Fix for missing libgfortran
- if [ ${PYTHON} = "3.4" ]; then PKGS="${PKGS} libgfortran=1"; fi
# Install packages
install:
- conda create --yes --quiet -n arch-test ${PKGS} ${OPTIONAL} statsmodels nbconvert nbformat pytest flake8
- source activate arch-test
- if [ ${COVERAGE} = true ]; then pip install coverage coveralls pytest-cov; fi;
- if [ ${STATSMODELS_MASTER} = true ]; then sh ./ci/statsmodels-master.sh; fi;
- python setup.py build
- python setup.py install
script:
# Show versions
- conda list
# flake testing
- flake8 arch --exclude=*test*
# Coverage
- export COVERAGE_OPTIONS=""
- SRCDIR=$PWD
- if [ ${COVERAGE} = true ]; then export COVERAGE_OPTIONS="--cov-config ${SRCDIR}/.travis_coveragerc --cov=arch --cov-report xml --cov-report html"; fi
# Main test
- mkdir -p "${SRCDIR}/travis-test"; cd "${SRCDIR}/travis-test"
- py.test -s $COVERAGE_OPTIONS --pyargs arch
after_success:
- if [ ${COVERAGE} = true ]; then coveralls --rcfile=${SRCDIR}/.travis_coveragerc; fi
- if [ ${COVERAGE} = true ]; then bash <(curl -s https://codecov.io/bash); fi
Computing file changes ...