forked from astropy/astroplan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
147 lines (121 loc) · 4.71 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
# 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
stage: Comprehensive tests
# 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:
# Set defaults to avoid repeating in most cases
- PYTHON_VERSION=3.6
- NUMPY_VERSION=stable
- ASTROPY_VERSION=stable
- MAIN_CMD='python setup.py'
- CONDA_DEPENDENCIES='pytz'
- PIP_DEPENDENCIES='pytest-astropy'
- SETUP_CMD='test -V'
- CONDA_CHANNELS='astropy'
stages:
# Do the initial tests and don't proceed if they fail
- name: Initial tests
# Do the rest of the tests
- name: Comprehensive tests
- name: Cron and master-only tests
if: type IN (push, cron)
matrix:
# Don't wait for allowed failures
fast_finish: true
include:
- stage: Initial tests
env: PYTHON_VERSION=2.7 SETUP_CMD='egg_info'
- stage: Initial tests
env: PYTHON_VERSION=3.5 SETUP_CMD='egg_info'
- stage: Initial tests
env: SETUP_CMD='egg_info'
# Try MacOS X
- os: osx
stage: Cron and master-only tests
env: PYTHON_VERSION=2.7
CONDA_DEPENDENCIES='pytz matplotlib'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
# Run one of the docs build during the initial tests
- os: linux
stage: Initial tests
env: SETUP_CMD='build_docs -w'
CONDA_DEPENDENCIES='pytz matplotlib astroquery'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
# Try all python versions with the latest numpy
# TODO: add the `--open-files` option back once this issue has been resolved:
# https://github.com/astropy/astroplan/pull/83#issuecomment-136129489
- os: linux
env: PYTHON_VERSION=2.7
- os: linux
env: PYTHON_VERSION=3.6
# Now try with all optional dependencies on 2.7 and an appropriate 3.x
# build (with latest numpy). We also note the code coverage on Python
# 2.7.
- os: linux
env: PYTHON_VERSION=2.7 SETUP_CMD='test --remote-data -V --coverage'
CONDA_DEPENDENCIES='pytz matplotlib'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
- os: linux
stage: Initial tests
env: SETUP_CMD='test --remote-data -V'
CONDA_DEPENDENCIES='pytz matplotlib'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
# Try older numpy versions
- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.11
- os: linux
env: PYTHON_VERSION=3.5 NUMPY_VERSION=1.10
# Try developer version of Numpy
- os: linux
env: PYTHON_VERSION=2.7 NUMPY_VERSION=dev
# Try pre-release version of Numpy. This only runs if a pre-release
# is available on pypi.
- os: linux
stage: Cron and master-only tests
env: NUMPY_VERSION=prerelease
# Try developer version of Astropy
- os: linux
env: PYTHON_VERSION=3.6 ASTROPY_VERSION=dev
# Do a PEP8 test with pycodestyle
- os: linux
env: MAIN_CMD='pycodestyle astroplan --count --max-line-length=100' SETUP_CMD=''
allow_failures:
- env: PYTHON_VERSION=2.7 NUMPY_VERSION=dev
# Allow them to fail now until the IERSs issues are fixed
- env: PYTHON_VERSION=2.7 SETUP_CMD='test --remote-data -V --coverage'
CONDA_DEPENDENCIES='pytz matplotlib'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
- env: SETUP_CMD='test --remote-data -V'
CONDA_DEPENDENCIES='pytz matplotlib'
PIP_DEPENDENCIES='pytest-mpl pytest-astropy'
install:
- git clone git://github.com/astropy/ci-helpers.git
- source ci-helpers/travis/setup_conda.sh
# This is needed to make matplotlib plot testing work
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then
export DISPLAY=:99.0;
sh -e /etc/init.d/xvfb start;
export QT_API=pyqt;
fi
script:
# To avoid the OldEarthOrientationDataWarning during docs build
- if [[ $SETUP_CMD == *build_docs* ]]; then python -c "from astroplan import download_IERS_A; download_IERS_A()";fi
- $MAIN_CMD $SETUP_CMD
after_success:
- if [[ $SETUP_CMD == *--coverage* ]]; then
coveralls --rcfile='astroplan/tests/coveragerc';
fi