Skip to content

Commit

Permalink
Use conda for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
astrofrog committed Dec 6, 2014
1 parent e61c7d6 commit 2c5a147
Show file tree
Hide file tree
Showing 3 changed files with 406 additions and 39 deletions.
59 changes: 21 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,35 @@ language: python
python:
- 2.6
- 2.7
- 3.2
- 3.3

env:
global:
- PIP_WHEEL_COMMAND="pip install --find-links http://wheels2.astropy.org/ --find-links http://wheels.astropy.org/ --use-wheel --upgrade --use-mirrors"
matrix:
- NUMPY_VERSION=1.7.1 SETUP_CMD='test'

matrix:
include:
# try alternate Numpy versions
# disabled for now, because the SciPy wheels only work for Numpy 1.7.1
# - python: 2.7
# env: NUMPY_VERSION=1.6.2 SETUP_CMD='test'
# - python: 2.7
# env: NUMPY_VERSION=1.5.1 SETUP_CMD='test'
# - python: 3.2
# env: NUMPY_VERSION=1.6.2 SETUP_CMD='test'
- python: 2.7
env: NUMPY_VERSION=1.7.1 SETUP_CMD='cov'
- 3.4

before_install:

# Install the pip that supports wheel
- pip install setuptools --upgrade
- pip install pip --upgrade
- pip install wheel
# Use utf8 encoding. Should be default, but this is insurance against
# future changes
- export PYTHONIOENCODING=UTF8
- 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 conda

# Make sure that interactive matplotlib backends work
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

- sudo apt-get update -qq
- sudo apt-get install -qq python-numpy python-scipy
# Make sure matplotlib uses PyQT not PySide
- export QT_API=pyqt

install:
- export PYTHONIOENCODING=UTF8 # just in case
- $PIP_WHEEL_COMMAND "Cython==0.19.1"
- $PIP_WHEEL_COMMAND "numpy==$NUMPY_VERSION"
- $PIP_WHEEL_COMMAND "scipy==0.13.1"
- $PIP_WHEEL_COMMAND "matplotlib==1.3.0"
- $PIP_WHEEL_COMMAND "astropy==0.3"
- if [[ $SETUP_CMD == cov ]]; then pip install pytest --use-mirrors; fi
- if [[ $SETUP_CMD == cov ]]; then pip install pytest-cov --use-mirrors; fi
- if [[ $SETUP_CMD == cov ]]; then pip install coveralls --use-mirrors; fi
- conda create --yes -n test -c astropy-ci-extras python=$TRAVIS_PYTHON_VERSION
- source activate test
- conda install --yes numpy scipy astropy matplotlib pytest pip
- pip install coverage coveralls pytest-cov

script:
- if [[ $SETUP_CMD == test ]]; then python setup.py test ; fi
- if [[ $SETUP_CMD == cov ]]; then py.test --cov sedfitter; fi
- py.test --cov sedfitter sedfitter

after_success:
- if [[ $SETUP_CMD == cov ]]; then coveralls; fi
- coveralls

0 comments on commit 2c5a147

Please sign in to comment.