forked from astropy/astroquery
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
159 lines (134 loc) · 6 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
# We set the language to c because the language ends up being
# irrelevant anyway and windows has a very limited support.
# Anyhow, 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
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: Windows test
- name: Deploy
if: ((branch = master) AND type != pull_request AND type != cron)
- 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.7
- MAIN_CMD='python setup.py'
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring aplpy matplotlib pyregion jinja2 flask regions'
- CONDA_DEPENDENCIES_REMOTE='requests beautifulsoup4 html5lib keyring aplpy matplotlib pyregion jinja2 flask regions'
- PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip astropy_healpix mocpy>=0.5.2 pytest-dependency pytest-astropy pyvo'
- 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'
- DEBUG=True
# astrometry.net API key
- secure: "al9u/QSQfrwNljdu8gYUaT9z4BxEL1FlE4ntsn6eqtN2Y0rurqll+gq46quYjtE6zgcpb0uYtGIubusJkp7ceE6IBGhQdsel4UY16VIqeEuQ3GpVDb4RiJgU51SAjbmXYV1dMAJnOm4Ra41WzxokStKRDdoRraAsae9zK3H6AnI="
matrix:
- PYTHON_VERSION=3.7 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
# No need to run it from cron
# Try MacOS X
- os: osx
stage: Cron tests
env: EVENT_TYPE='cron'
- 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
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. secretstorage is a keyring dependency, we
# need to pin the version number to make this job work.
# Test the oldest astropy version without optional dependencies.
- os: linux
stage: Tests with other Python/Numpy versions
env: PYTHON_VERSION=3.6 NUMPY_VERSION=1.14 KEYRING_VERSION='<12.0'
ASTROPY_VERSION=3.0 APLPY_VERSION='<2.0'
- os: linux
stage: Tests with other Python/Numpy versions
env: PYTHON_VERSION=3.6 NUMPY_VERSION=1.15 ASTROPY_VERSION=3.2
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: ASTROPY_VERSION=development EVENT_TYPE='pull_request'
# Try with optional dependencies disabled
- os: linux
stage: Test docs, astropy dev, and without optional dependencies
env: PYTHON_VERSION=3.8
CONDA_DEPENDENCIES='requests beautifulsoup4 html5lib keyring'
PIP_DEPENDENCIES='https://github.com/keflavich/httpbin/archive/master.zip pytest-astropy'
NUMPY_VERSION=1.16
# Do a PEP8 test with pycodestyle
- os: linux
env: MAIN_CMD='pycodestyle astroquery --count'
SETUP_CMD='' EVENT_TYPE='push pull_request'
# Do the windows test at the end as installing takes a long time
- os: windows
stage: Windows test
env: PYTHON_VERSION=3.7 SETUP_CMD='test'
- stage: Deploy
git:
depth: False
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
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