1language: python
2dist: xenial
3
4cache:
5  apt: true
6  ccache: true
7  pip: true
8  directories:
9    - $HOME/.cache
10
11env:
12  global:
13    - pip_install_common='pip>=9.0 setuptools>=43.0 wheel>=0.30'
14python:
15  - 2.7
16  - 3.5
17  - 3.6
18  - 3.7
19install: pip install $pip_install_common 'codecov>=2.0.15' -r requirements-test.txt
20script: script/test -sv && codecov
21
22stages:
23  - test
24  - release
25jobs:
26  fast_finish: true
27  include:
28    - stage: test
29      python: pypy
30      dist: trusty
31      install: pip install $pip_install_common 'codecov>=2.0.15' -r requirements-test.txt
32      script: script/test -sv && codecov
33    - stage: test
34      env: _=py2-pep8
35      python: 2.7
36      install: pip install -r requirements-test.txt
37      script: test_group=pep8 script/test
38    - stage: test
39      env: _=py3-pep8
40      python: 3.7
41      install: pip install -r requirements-test.txt
42      script: test_group=pep8 script/test
43    - stage: test
44      env: _-py37-openssl11
45      python: 3.7 # we'll use compiled version but makes Travis look correct
46      install:
47        - deactivate && rm -rf $HOME/virtualenv
48        - source script/compile-py3-openssl11.sh # source to alter PATH
49        - pip install virtualenv && virtualenv $HOME/virtualenv && source $HOME/virtualenv/bin/activate
50        - pip install $pip_install_common -r requirements-test.txt
51      script: script/test -sv
52    - stage: test
53      env: _=py2-package
54      python: 2.7
55      install: pip install $pip_install_common
56      script: test_group=package script/test
57    - stage: test
58      env: _=py3-package
59      python: 3.7
60      install: pip install $pip_install_common
61      script: test_group=package script/test
62    - stage: release
63      if: (branch = master)
64      env: _=pypi-upload-test
65      python: 3.7
66      install: pip install $pip_install_common
67      script: script/release -auto
68      deploy:
69        provider: pypi
70        server: https://test.pypi.org/legacy/
71        username: httplib2.release.test
72        password:
73          secure: "XN3oxobC+26UPiS+F1MvL4c6XtytejZ13SkLXCHfgVDPSASzKqF81CnR4EhsnbfZLvSgGHgSlfY5Jve5HF2VR9GzpJMc6wzcfkkeBg6PeRHuMppIqmuoq7BTw81SZL9X62/mju/vxXs2cHpVkwNTSE7W1JH1bVXPj86oAR9xXo9waRuXcyPGNuSqmOd1NPOMbFmeuz+HeArk2Fz7wwo6H5BJuXjOrEOHWD1rzeRchH901PBUrftm54Id2TIVMARW8jm1saQY2FtPWaBv2v/DJC1fKWMJpcNQ3mmcvrrTFC1IJ00dk9XJfqx5hnsRaergc0UvzHoOGEQKSMdg0PUAkvNohAoCf+3GddPkvk8MaZ+aQlijoK6wp93A5dfTxBVZqdhmEdheolbYiJPunzS60bWvaEv6/D15/xyMiwGamUmF1Tx7UIvvm/zj6tAOBWbNEgLRyvQ0qx2RE95GLtp+RXK4pT+Kig1+cof5hrWODuEl1SSLMBySaNLWO73IN9esZu0X1JS7svnROLRJCAvRjppJYswwCPziP+B8XQDeMrhIDMHNzdbtxOPpBAXpYUE764FkzaUTMsK83Q+ugE3Dx8xtrAzT4M0fdiFv+3QEhSUtfvWsLH9zS9wXC5Px9kPKU3FO8mdUyf7A0bIasvJLNcApDJigKjBukToOIsZVFok="
74        distributions: "sdist bdist_wheel"
75        skip_cleanup: true
76        on:
77          repo: httplib2/httplib2
78    - stage: release
79      if: (tag IS present)
80      env: _=pypi-upload-public
81      python: 3.7
82      install: pip install $pip_install_common
83      script: script/release -auto
84      deploy:
85        provider: pypi
86        username: httplib2.release
87        password:
88          secure: "jZAyMFnmbhYChjsb3gRYfESWlio6pgmWEWBRxtBQXYZf+tzyKVISyHuyWkJvOVTP+lOpp2MTPZ2s1UgxGwfzZ/VE034Cz5iA/C6wafmgtSW+wK+KEJFPseHBBA7Gh4ReiAPi2a+i1UXdsJpFNhv36E9tbTq2sEinbisE2lSEQ0KHadjkc+6pvCjlyhmes7QyM5GviWYlWRNj2OIkT8SUuUcWQt7ZEl6kN82MoMHCaf1YxE/i4JUP3VLomWK3RLZJP356Y4IDkzlVhFU4MJ4ubNtoQ/ECM0uQ+nsHzO0k1uGWdF6mMTna7U5gLqUi9rfCK3bLMeVSo+TUCpjI7HkWDaBgVXGTe5dUMJCDfRgqeYa0GnriI74XYJu8NGjMLv30uO58t9E7VQGo2NrFRJDzKAIHANejWnpUPY3XgoN1rlrh52seMjaU2+jO40EC8HvIqeRRwPwhkqCSV2y+IZT2bOFp2nbMWhkUMsxIX7OXt+sy8GvK/ilMleEl7r0tnudsT7lGdnMwXlttI3CIAFGE7E+0zwnxNiMzQDzo+ILVR7ezrCK9M9xVYKGa3i8gkpSn0Fblnltgg7HaEI8YC3rMZe4iu1t0D6cZZUAAp2ZUo3NCJcZ35iUFBhlFvjVDbe2upJgU6GFgtDLjyzCJiKbz8qLRgMFYgT0CGr512e1jBo0="
89        distributions: "sdist bdist_wheel"
90        skip_cleanup: true
91        on:
92          repo: httplib2/httplib2
93          tags: true
94