-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
172 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,154 +1,35 @@ | ||
# We set the language to c because python isn't supported on the MacOS X nodes | ||
# on Travis. However, the language ends up being irrelevant anyway, since we | ||
# install Python ourselves using conda. | ||
language: c | ||
language: generic | ||
|
||
os: | ||
- linux | ||
|
||
# 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 | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- graphviz | ||
- texlive-latex-extra | ||
- dvipng | ||
|
||
env: | ||
global: | ||
|
||
# The following versions are the 'default' for tests, unless | ||
# overridden underneath. They are defined here in order to save having | ||
# to repeat them for all configurations. | ||
- PYTHON_VERSION=3.6 | ||
- NUMPY_VERSION=stable | ||
- ASTROPY_VERSION=stable | ||
- MAIN_CMD='python setup.py' | ||
- SETUP_CMD='test' | ||
- PIP_DEPENDENCIES='' | ||
- EVENT_TYPE='pull_request push' | ||
|
||
|
||
# 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_DEPENDENCIES='Cython' | ||
|
||
# List other runtime dependencies for the package that are available as | ||
# pip packages here. | ||
# - PIP_DEPENDENCIES='' | ||
|
||
# Conda packages for affiliated packages are hosted in channel | ||
# "astropy" while builds for astropy LTS with recent numpy versions | ||
# are in astropy-ci-extras. If your package uses either of these, | ||
# add the channels to CONDA_CHANNELS along with any other channels | ||
# you want to use. | ||
- CONDA_CHANNELS='astropy-ci-extras astropy' | ||
|
||
# If there are matplotlib or other GUI tests, uncomment the following | ||
# line to use the X virtual framebuffer. | ||
# - SETUP_XVFB=True | ||
|
||
matrix: | ||
# Make sure that egg_info works without dependencies | ||
- PYTHON_VERSION=2.7 SETUP_CMD='egg_info' | ||
- PYTHON_VERSION=3.4 SETUP_CMD='egg_info' | ||
- PYTHON_VERSION=3.5 SETUP_CMD='egg_info' | ||
- PYTHON_VERSION=3.6 SETUP_CMD='egg_info' | ||
|
||
matrix: | ||
|
||
# Don't wait for allowed failures | ||
fast_finish: true | ||
cache: | ||
directories: | ||
- $HOME/miniconda3 | ||
|
||
include: | ||
# Try MacOS X | ||
- os: osx | ||
env: SETUP_CMD='test' | ||
before_cache: | ||
- rm -rf $HOME/miniconda3/pkgs/cache | ||
- rm -rf $HOME/miniconda3/envs/lcl | ||
|
||
# Do a coverage test. | ||
- os: linux | ||
env: SETUP_CMD='test --coverage' | ||
|
||
# Check for sphinx doc build warnings - we do this first because it | ||
# may run for a long time | ||
- os: linux | ||
env: SETUP_CMD='build_docs -w' | ||
|
||
# Now try Astropy dev with the latest Python and LTS with Python 2.7 and 3.x. | ||
- os: linux | ||
env: ASTROPY_VERSION=development | ||
EVENT_TYPE='pull_request push cron' | ||
- os: linux | ||
env: PYTHON_VERSION=2.7 ASTROPY_VERSION=lts | ||
- os: linux | ||
env: ASTROPY_VERSION=lts | ||
|
||
# Try all python versions and Numpy versions. Since we can assume that | ||
# the Numpy developers have taken care of testing Numpy with different | ||
# versions of Python, we can vary Python and Numpy versions at the same | ||
# time. | ||
|
||
- os: linux | ||
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.9 | ||
- os: linux | ||
env: PYTHON_VERSION=3.4 NUMPY_VERSION=1.10 | ||
- os: linux | ||
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.11 | ||
- os: linux | ||
env: NUMPY_VERSION=1.12 | ||
|
||
# Try numpy pre-release | ||
- os: linux | ||
env: NUMPY_VERSION=prerelease | ||
EVENT_TYPE='pull_request push cron' | ||
os: | ||
- linux | ||
- osx | ||
|
||
# Do a PEP8 test with pycodestyle | ||
- os: linux | ||
env: MAIN_CMD='pycodestyle packagename --count' SETUP_CMD='' | ||
env: | ||
- PYTHON_VERSION="3.5" | ||
- PYTHON_VERSION="3.6" | ||
- PYTHON_VERSION="3.7" | ||
|
||
allow_failures: | ||
# Do a PEP8 test with pycodestyle | ||
# (allow to fail unless your code completely compliant) | ||
- os: linux | ||
env: MAIN_CMD='pycodestyle packagename --count' SETUP_CMD='' | ||
before_install: | ||
- export PATH="$HOME/miniconda3/bin:$PATH" | ||
- chmod +x ci/install_conda.sh | ||
- chmod +x ci/setup_conda_env.sh | ||
|
||
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_DEPENDENCIES 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 --depth 1 git://github.com/astropy/ci-helpers.git | ||
- source ci-helpers/travis/setup_conda.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. | ||
|
||
- ci/install_conda.sh | ||
- ci/setup_conda_env.sh | ||
- source activate lcl | ||
- python setup.py install | ||
|
||
script: | ||
- $MAIN_CMD $SETUP_CMD | ||
|
||
after_success: | ||
# If coveralls.io is set up for this package, uncomment the line below. | ||
# The coveragerc file may be customized as needed for your package. | ||
# - if [[ $SETUP_CMD == *coverage* ]]; then coveralls --rcfile='packagename/tests/coveragerc'; fi | ||
- pytest --cov | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
if [ -d "$HOME/miniconda3" ] && [ -e "$HOME/miniconda3/bin/conda" ]; then | ||
echo "Miniconda install already present from cache: $HOME/miniconda3" | ||
rm -rf $HOME/miniconda3/envs/hosts # Just in case... | ||
else | ||
echo "Installing Miniconda..." | ||
rm -rf $HOME/miniconda3 # Just in case... | ||
|
||
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then | ||
wget http://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh || exit 1 | ||
else | ||
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh || exit 1 | ||
fi | ||
|
||
bash miniconda.sh -b -p "$HOME/miniconda3" || exit 1 | ||
fi | ||
|
||
echo "Configuring Miniconda..." | ||
conda config --set ssl_verify false || exit 1 | ||
conda config --set always_yes true --set changeps1 false || exit 1 | ||
|
||
echo "Updating Miniconda" | ||
conda update conda | ||
conda update --all | ||
conda info -a || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
echo "Creating a Python $PYTHON_VERSION environment" | ||
conda create -n lcl python=$PYTHON_VERSION || exit 1 | ||
source activate lcl | ||
|
||
echo "Installing packages..." | ||
conda install flake8 beautifulsoup4 lxml numpy astropy h5py | ||
pip install astroquery sedkit svo_filters pytest pytest-cov coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.