forked from cherrypy/cheroot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
181 lines (174 loc) · 4.41 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
dist: trusty
sudo: false
language: python
python:
- 2.7
- 3.4
- 3.5
# There's no pypy2.7-5.9.0 available in Travis CI
- &pypy2 pypy2.7-5.8.0
- &pypy3 pypy3.5-5.9.0
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)
- &manual_run_or_cron # run the job only if it's a cron run or it's triggered manually
if: type IN (api, cron)
- &pyenv_base
<<: *stage_test
language: generic
python: *pypy2
env:
- &env_pypy2 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
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
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
- &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
jobs:
fast_finish: true
allow_failures:
- env: &pep257_env TOXENV=pre-commit-pep257
include:
- <<: *lint_python_base
env: TOXENV=pre-commit
- <<: *lint_python_base
env: *pep257_env
- <<: *lint_python_base
env: TOXENV=setup-check
- <<: *pure_python_base_priority
# mainstream here (3.6)
- <<: *pure_python_base_priority
python: nightly
- <<: *osx_python_base
<<: *manual_run_or_cron
python: 2.7
env:
- PYTHON_VERSION=2.7.13
- *env_pyenv
- *env_path
- <<: *osx_python_base
<<: *manual_run_or_cron
python: 3.4
env:
- PYTHON_VERSION=3.4.6
- *env_pyenv
- *env_path
- <<: *osx_python_base
<<: *manual_run_or_cron
python: 3.5
env:
- PYTHON_VERSION=3.5.3
- *env_pyenv
- *env_path
- <<: *osx_python_base
python: *mainstream_python
env:
- PYTHON_VERSION=3.6.1
- *env_pyenv
- *env_path
- <<: *osx_python_base
<<: *manual_run_or_cron
python: nightly
env:
- PYTHON_VERSION=3.7-dev
- *env_pyenv
- *env_path
- <<: *osx_python_base
<<: *manual_run_or_cron
python: pypy2.7-5.9.0
env:
- PYTHON_VERSION=pypy2.7-5.9.0
- *env_pyenv
- *env_path
# pypy3.5-5.8.0 fails under OS X because it's unsupported (PR #26)
- <<: *stage_deploy
if: tag IS present
python: *mainstream_python
install: skip
script: skip
deploy:
provider: pypi
on:
all_branches: true
user: jaraco
password:
secure: RAfz06AINvz7bfij/YhfkAreRqamgxS8a6jSRNxntYhtJke3ZszUbIDag8+n1I+G5XT2LnMhHqPNR7Plc+AeMz7VXTuy+b81Li5kse20NYlPhd7mBVmTUpXtqYQashV5J39F4qkATBLznCOrMEomM07VTXjO/o2hmQuXniab2Uo=
distributions: dists
skip_cleanup: true
skip_upload_docs: true
cache:
pip: true
directories:
- $HOME/.pre-commit
- $HOME/Library/Caches/Homebrew
install:
- pip install tox "setuptools>=28.2"
script:
- tox
after_failure:
- ip a
- sysctl -a
- 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 cheroot/test/*.log`
do
echo Outputting $log
cat $log
done
- py_log=/home/travis/build/cherrypy/cheroot/.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
- *stage_test_name
- name: *stage_test_osx_name
if: type IN (api, cron) OR tag IS present
- name: *stage_deploy_name