-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
278 lines (263 loc) · 10.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
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
language: python
python:
dist:
addons:
coverity_scan:
# GitHub project metadata
project:
name: reactive-firewall/python-repo
version: 1.1.5
description: Python Repo Template
# Commands to prepare for build_command
# ** likely specific to your build **
build_command_prepend: make clean
# The command that will be added as an argument to "cov-build" to compile your project for analysis,
# ** likely specific to your build **
build_command: make test
# Pattern to match selecting branches that will run analysis. We recommend leaving this set to 'coverity_scan'.
# Take care in resource usage, and consider the build frequency allowances per
# https://scan.coverity.com/faq#frequency
branch_pattern: master
branches:
only:
- stable
- master
env:
matrix:
include:
- os: linux
python: "2.7"
env: TRAVIS_PYTHON_VERSION="2.7"
dist: trusty
- os: linux
python: "3.2"
env: TRAVIS_PYTHON_VERSION="3.2"
dist: trusty
- os: linux
python: "3.3"
env: TRAVIS_PYTHON_VERSION="3.3"
dist: trusty
- os: linux
python: "3.4"
dist: xenial
env: TRAVIS_PYTHON_VERSION="3.4"
- os: linux
python: "3.5"
env: TRAVIS_PYTHON_VERSION="3.5"
dist: trusty
- os: linux
python: "3.5"
env: TRAVIS_PYTHON_VERSION="3.5"
dist: xenial
- os: linux
python: "3.6"
env: TRAVIS_PYTHON_VERSION="3.6"
- os: linux
python: "3.5-dev" # 3.5 development branch
env: TRAVIS_PYTHON_VERSION="3.5"
dist: xenial
- os: linux
python: "3.6-dev"
env: TRAVIS_PYTHON_VERSION="3.6"
dist: bionic
- os: linux
python: "3.7-dev"
env: TRAVIS_PYTHON_VERSION="3.7"
dist: bionic
- os: linux
python: "3.7"
env: TRAVIS_PYTHON_VERSION="3.7"
dist: bionic
- os: linux
python: "3.8-dev"
env: TRAVIS_PYTHON_VERSION="3.8"
dist: bionic
- os: linux
python: "3.9-dev"
env: TRAVIS_PYTHON_VERSION="3.9"
dist: bionic
- os: linux
python: "pypy2.7-5.8.0"
dist: xenial
- os: linux
python: "pypy3.5-5.8.0"
dist: xenial
- os: linux
python: "pypy3.5-6.0"
dist: xenial
- os: linux
python: "pypy3.5-5.10.0"
env: TRAVIS_PYTHON_VERSION="3.5"
dist: xenial
- os: linux
python: "pypy2.7-5.10.0"
env: TRAVIS_PYTHON_VERSION="2.7"
dist: xenial
- os: linux
python: "nightly" # currently points to 3.9-dev
env: TRAVIS_PYTHON_VERSION="3.9-dev"
- os: osx
osx_image: xcode10
language: shell
- os: osx
osx_image: xcode11.1
language: shell
- os: osx
osx_image: xcode11.2
language: shell
- os: osx
osx_image: xcode11.3
language: shell
allow_failures:
- os: linux
dist: xenial
- os: linux
dist: trusty
- os: linux
python: "3.9-dev"
- os: linux
python: "2.6"
- os: linux
python: "3.2"
- os: linux
python: "3.3"
- os: linux
python: "3.4"
dist: xenial
- os: linux
python: "3.4"
dist: bionic
- os: linux
python: "3.7-dev"
- os: linux
python: "3.8-dev"
- os: linux
python: "3.9-dev"
- os: linux
python: "nightly"
- os: linux
python: "pypy"
- os: linux
python: "pypy3"
- os: linux
python: "pypy3.5-5.8.0"
- os: linux
python: "pypy2.7-5.8.0"
- os: linux
python: "pypy3.5-5.10.0"
- os: linux
python: "pypy2.7-5.10.0"
- os: linux
python: "pypy3.5-6.0"
- os: osx
osx_image: xcode6.4
language: shell
- os: osx
osx_image: xcode7.2
language: shell
- os: osx
osx_image: xcode7.3
language: shell
- os: osx
osx_image: xcode8
language: shell
- os: osx
osx_image: xcode8.3
language: shell
- os: osx
osx_image: xcode9
language: shell
- os: osx
osx_image: xcode9.2
language: shell
- os: osx
osx_image: xcode9.3
language: shell
- os: osx
osx_image: xcode9.4
language: shell
- os: osx
osx_image: xcode10
language: shell
- os: osx
osx_image: xcode10.1
language: shell
- os: osx
osx_image: xcode11
language: shell
- os: osx
osx_image: xcode11.1
language: shell
install: "make init"
before_install:
- if [ $TRAVIS_OS_NAME == osx ] ; then travis_wait git -C "$(brew --repo homebrew/core)" fetch --unshallow || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then travis_retry brew tap homebrew/versions || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then travis_wait brew upgrade || travis_retry brew upgrade || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python2.6 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python26 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then travis_wait brew install python3 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.3 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install py3.3 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.4 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python34 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install py3.4 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.5 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python35 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install py3.5 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.6 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python36 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install py3.6 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python2.7 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python27 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install py2.7 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.6 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install python3.7 || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install coverage $INSTALL || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install codecov || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then brew install pip || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then export VERSIONER_PYTHON_VERSION=${TRAVIS_PYTHON_VERSION:-3.7} || true ; fi
- if [ $TRAVIS_OS_NAME == osx ] ; then defaults write com.apple.versioner.python Version $TRAVIS_PYTHON_VERSION || true ; fi
- travis_retry pip install tox || pip install tox || true ;
- travis_retry pip install coverage || true ;
- travis_retry pip install codecov || true ;
- travis_retry python -m pip install coverage || python -m pip install coverage || true ;
- travis_retry python -m pip install codecov || python -m pip install codecov || true ;
- travis_retry python3 -m pip3 install tox || python3 -m pip install tox || true ;
- travis_retry python3 -m pip3 install coverage || python3 -m pip install coverage || true ;
- travis_retry python3 -m pip3 install codecov || python3 -m pip install codecov || true ;
- travis_retry python3 -m pip3 install -r requirements.txt || python3 -m pip install -r requirements.txt || true ;
# The following is used to get coveralls working: add affter codecov
# - travis_retry pip install python-coveralls 2>/dev/null || python3 -m pip install python-coveralls || true ;
# - coveralls 2>/dev/null || true
# - travis_retry pip uninstall -y python-coveralls || travis_retry python3 -m pip uninstall -y python-coveralls || true
# - travis_retry pip uninstall -y PyYAML || travis_retry python3 -m pip uninstall -y PyYAML || true
before_script:
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP code climate" ; else curl -L --url https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter 3>/dev/null 2>/dev/null || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP code climate" ; else chmod +x ./cc-test-reporter || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP code climate" ; else ./cc-test-reporter before-build || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP deepsource" ; else (curl https://deepsource.io/cli | sh) || true ; fi ;
script:
- make clean ;
- if [ $TRAVIS_OS_NAME == osx ] ; then echo "SKIP make test" ; else make test || exit $? ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov || exit $? ; fi ;
- cp -vf .coverage ".coverall.Lasting.45678.12345" 2>/dev/null || true
- make clean || exit $? ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP make test-tox" ; else make test-tox || exit $? ; fi ;
- make clean || true ;
- mv -vf ".coverall.Lasting.45678.12345" .coverage 2>/dev/null || true
after_failure:
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage" ; else coverage combine 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage xml" ; else coverage xml 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP deepsource" ; else ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml 2>/dev/null || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP code climate" ; else ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] || [ $TRAVIS_PYTHON_VERSION == "3.3" ] ; then echo "SKIP codecov" ; else codecov 2>/dev/null || true ; fi ;
- make clean 2>/dev/null || true
after_success:
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage" ; else coverage combine 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP coverage xml" ; else coverage xml 2>/dev/null || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP code climate" ; else ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || true ; fi ;
- if [ $TRAVIS_OS_NAME == osx ] || [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP deepsource" ; else ./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml 2>/dev/null || true ; fi ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else codecov || true ; fi ;
- travis_retry python3 -m pip install python-coveralls || python3 -m pip install python-coveralls || true ;
- if [ $TRAVIS_PYTHON_VERSION == "3.2" ] ; then echo "SKIP codecov" ; else coveralls 2>/dev/null || true ; fi ;