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

Commit

Permalink
Streamline travis config file because I'm sick of it
Browse files Browse the repository at this point in the history
  • Loading branch information
nmearl committed Apr 4, 2017
1 parent a66b091 commit ac88c5f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 96 deletions.
105 changes: 13 additions & 92 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,98 +1,19 @@
language: c

language: python
os:
- linux
- osx

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

# 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

python:
- "2.7"
- "3.5"
- "3.6"
addons:
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

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

# 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.

- "pip install -r requirements.txt"
script:
- 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
- sphinx-build -nW -b html -d _build/doctrees . _build/html
- pytest
5 changes: 1 addition & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
-index-url https://pypi.python.org/simple/

pyyaml
cython
numpy
Expand All @@ -10,5 +8,4 @@ sphinx_rtd_theme
specutils
pyqtgraph
pyqt5
qtpy
-e .
qtpy

0 comments on commit ac88c5f

Please sign in to comment.