forked from cherrypy/cherrypy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
177 lines (177 loc) · 4.94 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
language: python
os: linux
dist: trusty
sudo: false
group: edge
_base_envs:
- &stage_lint
stage: &stage_lint_name lint
- &stage_test
stage: &stage_test_name test
- &stage_test_priority
stage: &stage_test_priority_name test against latest Python versions first (under GNU/Linux)
- &stage_test_osx
stage: &stage_test_osx_name test under OS X (last chance to fail before deploy available)
- &stage_deploy
stage: &stage_deploy_name upload new version of python package to PYPI (only for tagged commits)
- _conditions:
- &condition_api_or_cron
if: type IN (api, cron)
- &pyenv_base
<<: *stage_test
language: generic
python: &pypy2 pypy2.7-5.8.0
env:
- PYTHON_VERSION=pypy2.7-5.8.0
- &env_pyenv PYENV_ROOT="$HOME/.pyenv"
- &env_path PATH="$PYENV_ROOT/bin:$PATH"
before_install:
- &ensure_pyenv_installed |
if [ ! -f "$PYENV_ROOT/bin/pyenv" ]
then
rm -rf "$PYENV_ROOT"
curl -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash
fi
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
pyenv update
- &install_python pyenv install --skip-existing --keep --verbose "$PYTHON_VERSION"
- &switch_python pyenv shell "$PYTHON_VERSION"
- &python_version python --version
- &osx_python_base
<<: *pyenv_base
<<: *stage_test_osx
os: osx
language: generic
before_install:
- brew update
- brew install readline xz
- *ensure_pyenv_installed
- *install_python
- *switch_python
- *python_version
before_cache:
- brew --cache
script:
- travis_retry tox
- &pure_python_base
<<: *stage_test
python: &mainstream_python 3.6
- &pure_python_base_priority
<<: *pure_python_base
<<: *stage_test_priority
- &lint_python_base
<<: *stage_lint
python: *mainstream_python
after_failure: skip
python:
- 3.4
- 3.7-dev
- *pypy2
- &pypy3 pypy3.5-5.8.0
jobs:
fast_finish: true
allow_failures:
# TODO: check what causes testing stuck
- python: *pypy2
# TODO: fix tests
- python: *pypy3
- env: TOXENV=pre-commit-pep257
include:
- <<: *lint_python_base
env: TOXENV=pre-commit
- <<: *lint_python_base
env: TOXENV=pre-commit-pep257
- <<: *lint_python_base
env: TOXENV=dist-check
- <<: *lint_python_base
env: TOXENV=setup-check
- <<: *pure_python_base_priority
# mainstream here (3.6)
- <<: *pure_python_base_priority
python: 2.7
- <<: *pure_python_base_priority
# mainstream here (3.6)
# run tests against the bleeding-edge cheroot
env: TOXENV=cheroot-master
- <<: *pure_python_base_priority
python: nightly
- <<: *osx_python_base
python: 2.7
env:
- PYTHON_VERSION=2.7.13
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: 3.4
env:
- PYTHON_VERSION=3.4.4
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: *mainstream_python
env:
- PYTHON_VERSION=3.6.1
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: 3.7-dev
env:
- PYTHON_VERSION=3.7-dev
- *env_pyenv
- *env_path
- <<: *osx_python_base
# mainstream here (3.6)
python: *mainstream_python
env:
- PYTHON_VERSION=3.6.1
# run tests against the bleeding-edge cheroot
- TOXENV=cheroot-master
- *env_pyenv
- *env_path
- <<: *stage_deploy
python: *mainstream_python
install: skip
script: skip
deploy:
provider: pypi
skip_cleanup: true
on:
tags: true
all_branches: true
python: *mainstream_python
user: jaraco
distributions: release
password:
secure: CQqUvtssQ4wmRluPcxh6m5lIXi83Qu9dAFAvZLS/+AQNIG78XECXv5xFTEdGSLX9yncKDpDKI3xRJeCKyO4OJUN0t6W1MRycY72+R63i9e9wPjfvtRqYH1TBT+no7jj/DHqXIrWSlpjRNAt4XXeSv7OzKWT4PmTNkNQSKyS1DWCmZGlbCKlV774Z9PbrfltflxL0V6DiX6ZfoY1THBO4rIopjMk/MPLgS5zvwLgXVbT9sK/DcPOgOq47iSLCs0oScbwiFzYW4DbcVZrBMv4ALtQTjk6ZEaBQ7KtKgsyxgi/ToVhjRxYg4rwvhjsyjixUdECLUqL3WgWfzW/lo82lhb79ERwhnjf1DvPNexlXhv9hHwHsFROpaOmM0nyDJsJg0rCNPVfO4SpBHEnd/ujlHO6yorHj0S54jZWqqDwD5gN19v3hEMT48Pc8uvazE9K1kMQbNXEzqn+SJjVB+DG7qK5Jm9Kk7ZC4R88hJAJNsR+SlFCXMGzkS9WUefUGLHQFfezZk43sMPIXMnh9d2XqCQo4QpUawdg3pwaTukFfyaHlK39CIHhZNas5D/UFL5spQPAAkH1IMcPILiSUwYYnXIJFWJIiulfEQalJroAQjrzvst/NVB8BbeYuCfmVLVOZw8Y6GOYONGgiXjT3nfmw/dN+uw+GY3EgAV5jl+fa434=
cache:
pip: true
directories:
- $HOME/.cache/pre-commit
- $HOME/Library/Caches/Homebrew
install:
- pip install tox "setuptools>=28.2"
script:
- tox
after_failure:
- echo "Here's a list of installed Python packages:"
- pip list --format=columns
- echo Dumping logs, because tests failed to succeed
- |
for log in `ls cherrypy/test/*.log`
do
echo Outputting $log
cat $log
done
- py_log=/home/travis/build/cherrypy/cherrypy/.tox/python/log/python-0.log
- echo Outputting python invocation log from $py_log
- cat $py_log
stages:
- *stage_lint_name
- *stage_test_priority_name
- name: *stage_test_name
<<: *condition_api_or_cron
- name: *stage_test_osx_name
<<: *condition_api_or_cron
- name: *stage_deploy_name
if: tag IS present