forked from astropy/astroquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
197 lines (171 loc) · 8.21 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# 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
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, which can no longer
# be installed with sudo apt-get.
addons:
apt:
packages:
- graphviz
- texlive-latex-extra
- dvipng
stage: Initial tests
stages:
- name: Initial tests
- name: Test docs, astropy dev, and without optional dependencies
- name: Cron tests
if: type = cron
- name: Tests with other Python/Numpy versions
- name: Deploy
if: ((branch = master) AND type != pull_request)
- name: Remote data tests
if: type != pull_request
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
- MAIN_CMD='python setup.py'
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring aplpy matplotlib pyregion jinja2 flask regions'
# pandas is used as a workaround of an astropy issue, sometimes it's required for the remote tests
- CONDA_DEPENDENCIES_REMOTE='requests beautifulsoup4 html5lib keyring aplpy matplotlib pyregion jinja2 flask pandas regions'
- PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip astropy_healpix mocpy pytest-dependency'
- HTTP_BIN_CMD="import httpbin; httpbin.app.run()"
- RUN_HTTPBIN='python -c "$HTTP_BIN_CMD" & ACTIVE_HTTPBIN=True'
- SETUP_CMD='test'
- CONDA_CHANNELS='astropy'
- EVENT_TYPE='pull_request push'
- ASTROPY_USE_SYSTEM_PYTEST=1
- DEBUG=true
matrix:
- 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
include:
# Testing remote-data when running builds on master or with
# cron. Starting these early as they take much longer to run. Using
# both short and long versions for remote-data to help test the
# astropy test command.
- os: linux
stage: Remote data tests
env: EVENT_TYPE='push cron' DEBUG=True ASTROPY_VERSION=dev
SETUP_CMD='test -R -V -a "--durations=50"'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
- os: linux
stage: Remote data tests
env: EVENT_TYPE='push cron' PYTHON_VERSION=2.7
SETUP_CMD='test --remote-data -V -a "--durations=50"'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
KEYRING_VERSION='<12.0'
# No need to run it from cron
# Try MacOS X
- os: osx
stage: Cron tests
env: SETUP_CMD='test' CONDA_CHANNELS='conda-forge astropy-ci-extras astropy'
EVENT_TYPE='cron'
- os: linux
env: SETUP_CMD='test --coverage' PIP_DEPENDENCIES="`echo $PIP_DEPENDENCIES codecov`"
# Check for sphinx doc build warnings - we do this first because it
# may run for a long time
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: SETUP_CMD='build_docs -w'
# 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. We don't expect any of these to fail in master for cron jobs.
- os: linux
stage: Tests with other Python/Numpy versions
env: PYTHON_VERSION=2.7 NUMPY_VERSION=1.9 KEYRING_VERSION='<12.0'
CONDA_DEPENDENCIES="`echo $CONDA_DEPENDENCIES | sed 's/ regions//'`"
PIP_DEPENDENCIES="`echo $PIP_DEPENDENCIES regions`" # There is an issue with the conda packaging of regions for np 1.9
before_script: conda install matplotlib=2.2.2=py27h0e671d2_0
# secretstorage is a keyring dependency, we need to pin the version number to make this job work
- os: linux
stage: Tests with other Python/Numpy versions
env: PYTHON_VERSION=3.4 NUMPY_VERSION=1.10 CONDA_DEPENDENCIES="`echo $CONDA_DEPENDENCIES secretstorage=3.0.1`"
- os: linux
stage: Tests with other Python/Numpy versions
env: PYTHON_VERSION=3.5.5 NUMPY_VERSION=1.11 KEYRING_VERSION='<12.0'
- os: linux
stage: Tests with other Python/Numpy versions
env: NUMPY_VERSION=1.12 ASTROPY_VERSION=1.3 PYTEST_VERSION='<3.2'
# Now try Astropy dev and LTS vesions with the latest Python.
# The dev version only need to be tested on PRs as there are pull
# and cron builds above already.
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: ASTROPY_VERSION=development EVENT_TYPE='pull_request'
# Astropy stable and LTS currently the same, enable these back when 3.0 is out
# - os: linux
# stage: Test docs, astropy dev, and without optional dependencies
# env: PYTHON_VERSION=2.7 ASTROPY_VERSION=lts
# EVENT_TYPE='push pull_request' PYTEST_VERSION=2.7
## Need to test with python3.5 for now as py3.6 requires pytest3 (due
## to the usage of unittest) that is incompatible with LTS
# - os: linux
# stage: Test docs, astropy dev, and without optional dependencies
# env: PYTHON_VERSION=3.5 ASTROPY_VERSION=lts
# EVENT_TYPE='push pull_request' PYTEST_VERSION=2.7
# Try with optional dependencies disabled
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: PYTHON_VERSION=2.7 KEYRING_VERSION='<12.0'
CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring'
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring'
# Try numpy pre-release version, this runs only when a pre-release
# is available on pypi.
- os: linux
stage: Tests with other Python/Numpy versions
env: NUMPY_VERSION=prerelease DEBUG=True EVENT_TYPE='push pull_request cron'
# Do a PEP8 test with pycodestyle
- os: linux
env: MAIN_CMD='pycodestyle astroquery --count'
SETUP_CMD='' EVENT_TYPE='push pull_request'
- stage: Deploy
env: SETUP_CMD='sdist' EVENT_TYPE='push'
deploy:
provider: pypi
user: astroquery
password:
secure: DtqyQkllGcWuKOVMsu9RWRiobeL8bdpMxwdSYpob4Cqj0D2hLLx3w50qr0qpDCFzioB3rXnhbtPKEzHB+4fTFT/Rjito32fFPUtee2Rw4SCe4YIlS0ksPOTmxkeoh2TQLIYcNPPoI7UpUX6uC65nzgCUTmZVoiCweQE+i5GhEBI=
on:
branch: master
before_install: if [[ ! -z $(echo $TRAVIS_COMMIT_MESSAGE | grep -E "\[nodeploy\]") ]]; then echo "Skipping deployment as indicated by commit message"; travis_terminate 0; fi
allow_failures:
# Allow remote-data tests to fail.
- os: linux
stage: Remote data tests
env: EVENT_TYPE='push cron' DEBUG=True ASTROPY_VERSION=dev
SETUP_CMD='test -R -V -a "--durations=50"'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
- os: linux
stage: Remote data tests
env: EVENT_TYPE='push cron' PYTHON_VERSION=2.7
SETUP_CMD='test --remote-data -V -a "--durations=50"'
CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
KEYRING_VERSION='<12.0'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
script:
- $RUN_HTTPBIN
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == 'test --coverage' ]]; then
codecov;
fi