Permalink
Fetching contributors…
Cannot retrieve contributors at this time
69 lines (64 sloc) 2.26 KB
language: python
python:
- "2.7"
# - "3.3"
- "3.4"
before_install:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
install:
# Issues have been encountered with installing numpy and scipy on
# Travis CI e.g. https://gist.github.com/dan-blanchard/7045057.
# Miniconda is recommended as the way to install these. See also:
# http://conda.pydata.org/docs/travis.html
# The following adopts approaches suggested in the above links.
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION
- source activate test-environment
# recipy setup.py fails to install flask for as-yet-unknown reason,
# and fails if it is not present, so install it explicitly.
- conda install flask
# Install recipy.
- python setup.py install
# Install behave for unit tests
- pip install -e . behave
# Install py.test explicitly else Travis CI will use the one in its
# virtualenv which can't use the Miniconda environment.
- conda install pytest
# Install packages needed for testing recipy.
- conda install python-dateutil pyyaml numpy git
# Install packages that recipy can log.
- conda install matplotlib
- conda install pandas pytables xlrd xlwt
- conda install lxml
- conda install beautifulsoup4
- conda install pillow
- conda install scikit-learn
- conda install scikit-image
- pip install nibabel
- conda install gdal
- pip install imageio
- pip install tifffile
# Copy matplotlib configuration so it does not try and plot to
# screen, which can cause matplotlib tests to fail.
- cp integration_test/packages/matplotlibrc .
# Print the environment.
- which python
- which pip
- which py.test
- py.test --version
- pip freeze
script:
- cd test/ && behave
- cd ..
# Run py.test with 'v' (verbose) to show test function names and
# 'rs' to show reasons for skipped tests
- py.test -v -rs integration_test