forked from glue-viz/glue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
155 lines (119 loc) · 5.88 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
language: c
os:
- linux
- osx
notifications:
email: false
env:
matrix:
- PYTHON_VERSION=2.7 MPL_VER=1.4 ASTRO_VER=1.0 QT_PKG=pyside
- PYTHON_VERSION=3.4 MPL_VER=1.4 ASTRO_VER=1.0 QT_PKG=pyqt
global:
- CONDA_ARGS="--yes"
- PIP_ARGS=""
- PYTEST_ARGS="--cov glue"
- NUMPY_VER=1.9
- IPYTHON_VER=4
- NO_CFG_FILES=false
- CONDA_DEPS="pip scipy cython h5py pygments pyzmq scikit-image pandas sphinx=1.2.3 xlrd pillow pytest mock coverage pyyaml requests sphinx_rtd_theme"
- PIP_BASE="pytest-cov coveralls pyavm astrodendro awscli"
- secure: NvQVc3XmmjXNVKrmaD31IgltsOImlnt3frAl4wU0pM223iejr7V57hz/V5Isx6sTANWEiRBMG27v2T8e5IiB7DQTxFUleZk3DWXQV1grw/GarEGUawXAgwDWpF0AE/7BRVJYqo2Elgaqf28+Jkun8ewvfPCiEROD2jWEpnZj+IQ=
- secure: "SU9BYH8d9eNigypG3lC83s0NY6Mq9AHGKXyEGeXDtz1npJIC1KHdzPMP1v1K3dzCgl1p6ReMXPjZMCENyfNkad/xvzTzGk0Nu/4BjihrUPV6+ratVeLpv0JLm8ikh8q+sZURkdtzUOlds+Hfn5ku4LdpT87tcKHY9TINAGA34ZM="
- AWS_ACCESS_KEY_ID: AKIAI2ERWDHLW3W24X3A
- AWS_SECRET_ACCESS_KEY: $AWS_SECRET_KEY_ID
matrix:
include:
# Python 2.6
- os: linux
env:
- PYTHON_VERSION=2.6 IPYTHON_VER=1 MPL_VER=1.4 ASTRO_VER=0.4 QT_PKG=pyside
# Astropy dev
- os: linux
env:
- PYTHON_VERSION=2.7 MPL_VER=1.4 ASTRO_VER=dev QT_PKG=pyside
# The following configuration tests that glue functions with minimal
# dependencies. The --no-deps is to prevent scipy from getting
# installed as a pandas dependency.
- os: linux
env:
- PYTHON_VERSION=2.7
- PYTEST_ARGS="--cov glue"
- CONDA_DEPS="pip setuptools=7.0 numpy=$NUMPY_VER pandas mock pbr six funcsigs --no-deps"
- IPYTHON_VER=None
- ASTRO_VER=None
- MPL_VER=1.4
- PIP_BASE="pytest-cov coveralls"
- QT_PKG=pyqt
- os: linux
env:
- PYTHON_VERSION=2.7
- MPL_VER=1.4
- ASTRO_VER=1.0
- DOC_TRIGGER=1
- APP_TRIGGER=1
- GINGA=1
- PYTEST_ARGS="--cov glue --no-optional-skip"
- QT_PKG=pyside
- NO_CFG_FILES=true
# Test with older package versions:
- os: linux
env: PYTHON_VERSION=2.7 MPL_VER=1.3 ASTRO_VER=0.3 NUMPY_VER=1.8 QT_PKG=pyqt
- os: linux
env: PYTHON_VERSION=2.7 MPL_VER=1.4 ASTRO_VER=0.4 IPYTHON_VER=1.1 QT_PKG=pyqt
- os: linux
env: PYTHON_VERSION=2.7 MPL_VER=1.4 ASTRO_VER=0.4 IPYTHON_VER=0.13 QT_PKG=pyqt
before_install:
# Install conda
- source continuous-integration/travis/install_conda_$TRAVIS_OS_NAME.sh
# Deal with issue on Travis builders
- if [[ $TRAVIS_OS_NAME == linux ]]; then sudo rm -rf /dev/shm; sudo ln -s /run/shm /dev/shm; fi
# Setup system for headless GUI handling
- if [[ $TRAVIS_OS_NAME == linux ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; fi
# setup tools to trigger mac buildbot
- if [ $APP_TRIGGER ]; then source .setup_app_trigger.sh; fi
- if [ $TRAVIS_BRANCH = master ]; then export S3_DIR=latest; else export S3_DIR=$TRAVIS_BRANCH; fi
# now set up a plugin configuration file with some plugins disabled. This is
# to make sure that when we run the tests, glue will ignore this
# configuration and will instead run tests for all plugins.
- if [[ $NO_CFG_FILES == false ]]; then mkdir ~/.glue; printf "[plugins]\nspectrum_tool = 0\n" >> ~/.glue/plugins.cfg; fi
install:
- if [[ $PYTHON_VERSION == 2.6 && $IPYTHON_VER == 2 ]]; then export IPYTHON_VER=1; fi
- conda create --yes -n test python=$PYTHON_VERSION
- source activate test
# Some package versions should always be specified when installing packages
# to make sure they are not updated.
- export CONDA_BASE="python=$PYTHON_VERSION numpy=$NUMPY_VER matplotlib=$MPL_VER"
- conda install $CONDA_ARGS $CONDA_BASE $CONDA_DEPS
- conda install $CONDA_ARGS $CONDA_BASE $QT_PKG
- LC_ALL=C pip install $PIP_ARGS $PIP_BASE
- if [[ $GINGA ]]; then pip install $PIP_ARGS https://github.com/glue-viz/ginga/archive/master.zip; fi
- if [[ $ASTRO_VER == dev ]]; then pip install -e git+git://github.com/astropy/astropy.git#egg=astropy; fi
- if [[ $ASTRO_VER != dev && $ASTRO_VER != None ]]; then conda install $CONDA_ARGS $CONDA_BASE numpy=$NUMPY_VER astropy=$ASTRO_VER; fi
- if [[ $IPYTHON_VER != None ]]; then conda install $CONDA_ARGS $CONDA_BASE IPython=$IPYTHON_VER; fi
- if [[ $IPYTHON_VER == 4 ]]; then conda install $CONDA_ARGS $CONDA_BASE qtconsole ipykernel; fi
# For now we also install astropy_helpers because setup_requires has a bug
# that means it generates PEP440 warnings for the astropy_helpers version
# number.
- if [ $DOC_TRIGGER ]; then pip install astropy-helpers linkchecker; fi
# Uninstal PyQt if we are using PySide
- if [ $QT_PKG == pyside ]; then conda remove --yes pyqt sip; fi
- python setup.py install
script:
- py.test $PYTEST_ARGS glue -s
- if [ $DOC_TRIGGER ]; then cd doc && make html 2> warnings.log && cd ../ ; fi
# In the following command, the test -s ensures that warnings are not emitted
# by the docs build.
- if [ $DOC_TRIGGER ]; then
cat doc/warnings.log;
test ! -s doc/warnings.log;
linkchecker --ignore-url=".*fontawesome_webfont.*" doc/_build/html;
fi
after_success:
# Coverage testing
- coveralls
# Trigger the building of the MacOS X app in the Travis-MacGlue repo
- if [ $APP_TRIGGER ]; then ./.trigger_app_build.sh; fi
# For any branch (but not pull requests), upload the docs to s3
- if [[ $DOC_TRIGGER && $TRAVIS_SECURE_ENV_VARS == true && $TRAVIS_PULL_REQUEST == false ]]; then cd doc && make s3 && cd ../; fi
# For the master branch, also upload the docs to the 'latest' URL
- if [[ $DOC_TRIGGER && $TRAVIS_SECURE_ENV_VARS == true && $TRAVIS_BRANCH == master && $TRAVIS_PULL_REQUEST == false ]]; then cd doc && make s3latest && cd ../; fi