forked from astropy/astroquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
137 lines (117 loc) · 5.29 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
# 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
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'
# 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'
- PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip'
- HTTP_BIN_CMD="import httpbin; httpbin.app.run()"
- RUN_HTTPBIN='python -c "$HTTP_BIN_CMD" & ACTIVE_HTTPBIN=True'
- SETUP_CMD='test'
- CONDA_CHANNELS='astropy-ci-extras astropy'
- EVENT_TYPE='pull_request push'
- ASTROPY_USE_SYSTEM_PYTEST=1
- SPHINX_VERSION='>=1.6'
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
env: EVENT_TYPE='push cron' DEBUG=True ASTROPY_VERSION=dev
SETUP_CMD='test -R -V' CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
- os: linux
env: EVENT_TYPE='push cron' PYTHON_VERSION=2.7
SETUP_CMD='test --remote-data -V' CONDA_DEPENDENCIES=$CONDA_DEPENDENCIES_REMOTE
# No need to run it from cron
# Try MacOS X
- os: osx
env: SETUP_CMD='test' CONDA_CHANNELS='conda-forge astropy-ci-extras astropy'
- 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'
# 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
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 ASTROPY_VERSION=1.3
# Now try Astropy dev and LTS vesions with the latest 3.x and 2.7.
# The dev version only need to be tested on PRs as there are pull
# and cron builds above already.
- os: linux
env: PYTHON_VERSION=2.7 ASTROPY_VERSION=development EVENT_TYPE='pull_request'
- os: linux
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
# 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
# env: PYTHON_VERSION=3.5 ASTROPY_VERSION=lts
# EVENT_TYPE='push pull_request' PYTEST_VERSION=2.7
# Try with optional dependencies disabled
- os: linux
env: PYTHON_VERSION=2.7
CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring'
- os: linux
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
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'
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
coveralls --rcfile='astroquery/tests/coveragerc';
fi