Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
Travis tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nmearl committed Apr 5, 2017
1 parent ac88c5f commit c39e52c
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 15 deletions.
105 changes: 92 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,98 @@
language: python
language: c

os:
- linux
- osx
python:
- "2.7"
- "3.5"
- "3.6"

# Setting sudo to false opts in to Travis-CI container-based builds.
sudo: true

# The apt packages below are needed for sphinx builds. A full list of packages
# that can be included can be found here:
#
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise

addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng

env:
global:
# The following versions are the 'default' for tests, unless
# overidden underneath. They are defined here in order to save having
# to repeat them for all configurations.
- ASTROPY_VERSION=stable
- SETUP_CMD='test'
- PIP_DEPENDENCIES='sphinx_automodapi sphinx_rtd_theme'
# For this package-template, we include examples of Cython modules,
# so Cython is required for testing. If your package does not include
# Cython code, you can set CONDA_DEPENDENCIES=''
- CONDA_CHANNELS='http://ssb.stsci.edu/astroconda astropy-ci-extras'
- CONDA_DEPENDENCIES='numpy scipy cython specutils qtpy pyqtgraph pyyaml six'

matrix:
- PYTHON_VERSION=2.7 SETUP_CMD='install'
- PYTHON_VERSION=2.7 SETUP_CMD='test'
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- PYTHON_VERSION=3.5 SETUP_CMD='install'
- PYTHON_VERSION=3.5 SETUP_CMD='test'
- PYTHON_VERSION=3.5 SETUP_CMD='egg_info'


matrix:
include:
# Do a coverage test in Python 2.
- env: PYTHON_VERSION=2.7 SETUP_CMD='test --coverage'

# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- env: PYTHON_VERSION=2.7 SETUP_CMD='build_sphinx -w'

# Try Astropy development version
- env: PYTHON_VERSION=2.7 ASTROPY_VERSION=development

- env: PYTHON_VERSION=3.5 ASTROPY_VERSION=development

before_install:

# If there are matplotlib tests, comment these out to
# Make sure that interactive matplotlib backends work
# - export DISPLAY=:99.0
# - sh -e /etc/init.d/xvfb start

install:
- "pip install -r requirements.txt"

# We now use the ci-helpers package to set up our testing environment.
# This is done by using Miniconda and then using conda and pip to install
# dependencies. Which dependencies are installed using conda and pip is
# determined by the CONDA_DEPDENDENCIES and PIP_DEPENDENCIES variables,
# which should be space-delimited lists of package names. See the README
# in https://github.com/astropy/ci-helpers for information about the full
# list of environment variables that can be used to customize your
# environment. In some cases, ci-helpers may not offer enough flexibility
# in how to install a package, in which case you can have additional
# commands in the install: section below.

- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda_$TRAVIS_OS_NAME.sh

# As described above, using ci-helpers, you should be able to set up an
# environment with dependencies installed using conda and pip, but in some
# cases this may not provide enough flexibility in how to install a
# specific dependency (and it will not be able to install non-Python
# dependencies). Therefore, you can also include commands below (as
# well as at the start of the install section or in the before_install
# section if they are needed before setting up conda) to install any
# other dependencies.

script:
- sphinx-build -nW -b html -d _build/doctrees . _build/html
- pytest
- python setup.py $SETUP_CMD

after_success:
# If coveralls.io is set up for this package, uncomment the line
# below and replace "packagename" with the name of your package.
# The coveragerc file may be customized as needed for your package.
# - if [[ $SETUP_CMD == 'test --coverage' ]]; then coveralls --rcfile='packagename/tests/coveragerc'; fi
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ cython
numpy
scipy
astropy
sphinx
sphinx_automodapi
sphinx_rtd_theme
specutils
pyqtgraph
pyqt5
pyqt5; python_version >= '3.5'
qtpy
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,13 @@
'pyyaml',
'pyqtgraph',
'scipy',
'pyqt5',
'qtpy'
],
extras_require={
':python_version >= "3.5"': [
'pyqt5',
],
},
author=AUTHOR,
author_email=AUTHOR_EMAIL,
license=LICENSE,
Expand Down

0 comments on commit c39e52c

Please sign in to comment.