forked from NASA-NAVO/servicemon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
174 lines (142 loc) · 5.68 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
language: python
# We need a full clone to make sure setuptools_scm works properly
git:
depth: false
os:
- linux
# The apt packages below are needed for sphinx builds. A full list of packages
# that can be included can be found here:
#
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-precise
addons:
apt:
packages:
- graphviz
stages:
# Do the style check and a single test job, don't proceed if it fails
- name: Initial tests
# Test docs, astropy dev, and without optional dependencies
- name: Comprehensive tests
# These will only run when cron is opted in
- name: Cron tests
if: type = cron
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.
# The following three variables are for tox. TOXENV is a standard
# variable that tox uses to determine the environment to run,
# TOXARGS are arguments passed to tox, and TOXPOSARGS are arguments
# that tox passes through to the {posargs} indicator in tox.ini.
# The latter can be used for example to pass arguments to pytest.
- TOXENV='test'
- TOXARGS='-v'
- TOXPOSARGS=''
# The following is needed to avoid issues if e.g. Matplotlib tries
# to open a GUI window.
- SETUP_XVFB=True
matrix:
# Don't wait for allowed failures
fast_finish: true
include:
# Try MacOS X, usually enough only to run from cron as hardly there are
# issues that are not picked up by a linux worker. We set language to
# 'c' since 'python' doesn't work on non-Linux platforms.
- os: osx
language: c
name: Python 3.7 with required dependencies
stage: Cron tests
env: PYTHON_VERSION=3.7 TOXENV=py37-test
# Do a regular build on Linux with Python 3.8, with cov
# For Linux we use language: python to avoid using conda.
- os: linux
python: 3.8
name: Python 3.8 with required dependencies and measure coverage
stage: Initial tests
env: TOXENV=py38-test-cov
# Check for sphinx doc build warnings
- os: linux
python: 3.8
name: Documentation build
stage: Comprehensive tests
env: TOXENV=build_docs
# Now try Astropy dev with the latest Python
- os: linux
python: 3.8
name: Python 3.8 with developer version of astropy
stage: Comprehensive tests
env: TOXENV=py38-test-devdeps
# And with an older Python, Astropy LTS, and the oldest supported Numpy
# - os: linux
# python: 3.6
# name: Python 3.6 astropy LTS and Numpy 1.16
# stage: Comprehensive tests
# env: TOXENV=py36-test-astropylts-numpy116
# Add a job that runs from cron only and tests against astropy dev and
# numpy dev to give a change for early discovery of issues and feedback
# for both developer teams.
- os: linux
python: 3.8
name: Python 3.8 latest developer version of key dependencies
stage: Cron tests
env: TOXENV=py38-test-devdeps
# Try on Windows.
- os: windows
language: c
name: Python 3.8 with required dependencies
stage: Comprehensive tests
env: PYTHON_VERSION=3.8 TOXENV=py38-test
# Try other 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.
# - os: linux
# python: 3.7
# name: Python 3.7 with astropy 3.0 and Numpy 1.17
# stage: Comprehensive tests
# env: TOXENV=py37-test-astropy30-numpy117
# Do a code style check
- os: linux
python: 3.8
name: Code style checks
stage: Initial tests
env: TOXENV=codestyle
allow_failures:
# Do a PEP8 test with flake8
# (do allow to fail unless your code completely compliant)
# - os: linux
# python: 3.8
# name: Code style checks
# stage: Initial tests
# env: TOXENV=codestyle
before_install:
# Create a coverage.xml for use by coveralls or codecov
- if [[ $TOXENV == *-cov ]]; then
export TOXPOSARGS=$TOXPOSARGS" --cov-report=xml:"$TRAVIS_BUILD_DIR"/coverage.xml";
fi
install:
# We now use the ci-helpers package to set up our Python environment
# on Windows and MacOS X but we don't set up any other dependencies,
# instead using tox to do this. See https://github.com/astropy/ci-helpers
# for more information about ci-helpers.
- if [[ $TRAVIS_OS_NAME != linux ]]; then
git clone --depth 1 git://github.com/astropy/ci-helpers.git;
source ci-helpers/travis/setup_conda.sh;
fi
script:
- pip install tox
- tox $TOXARGS -- $TOXPOSARGS
after_success:
# if either coveralls or codecov is used, uncomment the if and fi statements
# and the appropriate two lines inside the if statement
# - if [[ $TOXENV == *-cov ]]; then
# # If coveralls.io is set up for this package, uncomment the two lines below.
# pip install coveralls;
# coveralls;
# # If codecov is set up for this package, uncomment the two lines below
# pip install codecov;
# codecov;
# fi
# This was added to debug the build issue related to having a tag that specified a dev #
# after_failure: cat .tox/.package/log/.package-3.log