blob: 52131e83a8644093f19ce55d6df9c022bde3da89 [file] [log] [blame]
Paul Kehrer465e80e2017-06-08 22:08:36 -10001dist: trusty
Paul Kehrerbb5c3a92015-04-13 10:55:33 -04002sudo: false
Jean-Paul Calderone7166c8b2014-01-10 14:40:35 -05003language: python
Alex Gaynore608e622015-07-03 12:21:14 -04004
5cache:
6 directories:
Alex Gaynorbe0aef72016-06-04 18:43:52 -07007 - $HOME/.cache/pip
Alex Gaynore608e622015-07-03 12:21:14 -04008
Hynek Schlawack4c272432015-05-14 13:39:40 +02009env:
10 global:
11 - LC_ALL=en_US.UTF-8
Jean-Paul Calderone7166c8b2014-01-10 14:40:35 -050012
Paul Kehrer9bf3f5c2014-03-13 22:43:54 -040013matrix:
14 include:
Paul Kehrerbb5c3a92015-04-13 10:55:33 -040015 - language: generic
16 os: osx
Paul Kehrer1f9c5d12019-01-21 12:43:54 -060017 osx_image: xcode10.1
Alex Gaynorbf012872016-06-04 13:18:39 -070018 env: TOXENV=py27
Alex Gaynor5af32d02016-09-24 01:52:21 -040019 - language: generic
20 os: osx
Paul Kehrer1f9c5d12019-01-21 12:43:54 -060021 osx_image: xcode10.1
Alex Gaynor5af32d02016-09-24 01:52:21 -040022 env: TOXENV=py27 OPENSSL=1.1.0
Jeremy Lainé1ae7cb62018-03-21 14:49:42 +010023 - python: "2.7" # these are just to make travis's UI a bit prettier
Paul Kehrerbb5c3a92015-04-13 10:55:33 -040024 env: TOXENV=py27
Paul Kehrer95e2b072015-04-13 15:50:18 -040025 - python: "3.4"
Paul Kehrerbb5c3a92015-04-13 10:55:33 -040026 env: TOXENV=py34
Hynek Schlawack5ab40562015-09-22 09:39:03 +020027 - python: "3.5"
28 env: TOXENV=py35
Hynek Schlawack1089ed22017-01-30 12:11:14 +010029 - python: "3.6"
30 env: TOXENV=py36
Alex Gaynor0f82c1f2018-07-04 11:34:20 -040031 - python: "3.7"
32 env: TOXENV=py37
33 dist: xenial
34 sudo: true
Jeremy Lainé57c2f032018-03-21 16:02:10 +010035 - python: "pypy"
36 env: TOXENV=pypy
37 - python: "pypy3"
38 env: TOXENV=pypy3
Hynek Schlawack961ff482015-05-04 18:01:58 +020039
Jean-Paul Calderonea2d7e092014-04-17 10:07:34 -040040 # Also run the tests against cryptography master.
Paul Kehrer95e2b072015-04-13 15:50:18 -040041 - python: "2.7"
Hynek Schlawack9f925dc2015-05-04 17:41:57 +020042 env: TOXENV=py27-cryptographyMaster
Paul Kehrer95e2b072015-04-13 15:50:18 -040043 - python: "3.4"
Hynek Schlawack9f925dc2015-05-04 17:41:57 +020044 env: TOXENV=py34-cryptographyMaster
Hynek Schlawack5ab40562015-09-22 09:39:03 +020045 - python: "3.5"
46 env: TOXENV=py35-cryptographyMaster
Hynek Schlawack1089ed22017-01-30 12:11:14 +010047 - python: "3.6"
48 env: TOXENV=py36-cryptographyMaster
Alex Gaynor0f82c1f2018-07-04 11:34:20 -040049 - python: "3.7"
50 env: TOXENV=py37-cryptographyMaster
51 dist: xenial
52 sudo: true
Jeremy Lainé57c2f032018-03-21 16:02:10 +010053 - python: "pypy"
54 env: TOXENV=pypy-cryptographyMaster
55 - python: "pypy3"
56 env: TOXENV=pypy3-cryptographyMaster
Jean-Paul Calderonea2d7e092014-04-17 10:07:34 -040057
Hynek Schlawack73412e52016-03-16 13:37:05 +010058 # And current minimum cryptography version.
Hynek Schlawack2a91ba32016-01-31 14:18:54 +010059 - python: "2.7"
Hynek Schlawack73412e52016-03-16 13:37:05 +010060 env: TOXENV=py27-cryptographyMinimum
Hynek Schlawack2a91ba32016-01-31 14:18:54 +010061 - python: "3.4"
Hynek Schlawack73412e52016-03-16 13:37:05 +010062 env: TOXENV=py34-cryptographyMinimum
Hynek Schlawack2a91ba32016-01-31 14:18:54 +010063 - python: "3.5"
Hynek Schlawack73412e52016-03-16 13:37:05 +010064 env: TOXENV=py35-cryptographyMinimum
Hynek Schlawack1089ed22017-01-30 12:11:14 +010065 - python: "3.6"
66 env: TOXENV=py36-cryptographyMinimum
Alex Gaynor0f82c1f2018-07-04 11:34:20 -040067 - python: "3.7"
68 env: TOXENV=py37-cryptographyMinimum
69 dist: xenial
70 sudo: true
Jeremy Lainé57c2f032018-03-21 16:02:10 +010071 - python: "pypy"
72 env: TOXENV=pypy-cryptographyMinimum
73 - python: "pypy3"
74 env: TOXENV=pypy3-cryptographyMinimum
Hynek Schlawack2a91ba32016-01-31 14:18:54 +010075
76
Cory Benfieldd296b1b2016-03-14 15:09:19 +000077 # Make sure we don't break Twisted or urllib3
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +020078 - python: "2.7"
Hynek Schlawacka53fb7a2015-10-21 14:07:27 +020079 env: TOXENV=py27-twistedMaster
Cory Benfieldd296b1b2016-03-14 15:09:19 +000080 - python: "3.5"
81 env: TOXENV=py35-urllib3Master
Hynek Schlawack8ff2ad92015-10-19 17:03:35 +020082
83
Hynek Schlawack59365192015-05-05 18:44:49 +020084 # Meta
85 - python: "2.7"
86 env: TOXENV=check-manifest
87
88 - python: "2.7"
89 env: TOXENV=pypi-readme
90
Laurens Van Houtven5ffdcf52015-05-13 08:10:24 -070091 - python: "2.7"
Laurens Van Houtven8aea6942015-05-18 10:55:33 -070092 env: TOXENV=flake8
Hynek Schlawack59365192015-05-05 18:44:49 +020093
Laurens Van Houtvendde3a8b2015-05-15 09:48:30 -070094 - python: "2.7"
Laurens Van Houtvenecb8c9c2015-05-26 10:46:29 -070095 env: TOXENV=docs
Hynek Schlawackb3b27652015-07-03 16:50:27 +020096
Hynek Schlawackaa861212016-03-13 13:53:48 +010097 # Let the cryptography master builds fail because they might be caused by
98 # cryptography changes that are beyond our control.
Paul Kehrer9bf3f5c2014-03-13 22:43:54 -040099 allow_failures:
Hynek Schlawack9f925dc2015-05-04 17:41:57 +0200100 - env: TOXENV=py27-cryptographyMaster
Hynek Schlawack9f925dc2015-05-04 17:41:57 +0200101 - env: TOXENV=py34-cryptographyMaster
Hynek Schlawack5ab40562015-09-22 09:39:03 +0200102 - env: TOXENV=py35-cryptographyMaster
Hynek Schlawack1089ed22017-01-30 12:11:14 +0100103 - env: TOXENV=py36-cryptographyMaster
Alex Gaynor0f82c1f2018-07-04 11:34:20 -0400104 - env: TOXENV=py37-cryptographyMaster
Hynek Schlawackaa861212016-03-13 13:53:48 +0100105 - env: TOXENV=pypy-cryptographyMaster
Jeremy Lainé57c2f032018-03-21 16:02:10 +0100106 - env: TOXENV=pypy3-cryptographyMaster
Alex Gaynorc3697ad2017-11-20 08:19:32 -0500107
Laurens Van Houtvenc9159752015-05-14 13:30:19 -0700108
Jean-Paul Calderone2afc3a12014-03-08 16:01:41 -0500109install:
Paul Kehrerbb5c3a92015-04-13 10:55:33 -0400110 - |
111 if [[ "$(uname -s)" == 'Darwin' ]]; then
112 brew update
Alex Gaynor5af32d02016-09-24 01:52:21 -0400113 if [[ "${OPENSSL}" == "1.1.0" ]]; then
Alex Gaynorc3697ad2017-11-20 08:19:32 -0500114 brew upgrade openssl@1.1
Alex Gaynor5af32d02016-09-24 01:52:21 -0400115 else
116 brew upgrade openssl
117 fi
Paul Kehrerbb5c3a92015-04-13 10:55:33 -0400118 curl -O https://bootstrap.pypa.io/get-pip.py
119 python get-pip.py --user
Alex Gaynorc3697ad2017-11-20 08:19:32 -0500120 python -m pip install --user virtualenv
Paul Kehrerbb5c3a92015-04-13 10:55:33 -0400121 else
122 pip install virtualenv
123 fi
124 python -m virtualenv ~/.venv
Hynek Schlawackeb2720e2015-07-03 19:24:59 +0200125 ~/.venv/bin/pip install tox coverage
Jean-Paul Calderone99a69482014-04-14 10:43:04 -0400126
Jean-Paul Calderone4281e522014-01-10 14:46:59 -0500127script:
Jean-Paul Calderonea2d7e092014-04-17 10:07:34 -0400128 - |
Alex Gaynorbf012872016-06-04 13:18:39 -0700129 if [[ "$(uname -s)" == 'Darwin' ]]; then
Paul Kehrerbb5c3a92015-04-13 10:55:33 -0400130 # set our flags to use homebrew openssl
Alex Gaynor5af32d02016-09-24 01:52:21 -0400131 if [[ "${OPENSSL}" == "1.1.0" ]]; then
132 export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
133 export CFLAGS="-I/usr/local/opt/openssl@1.1/include"
134 export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"
135 else
136 export LDFLAGS="-L/usr/local/opt/openssl/lib"
137 export CFLAGS="-I/usr/local/opt/openssl/include"
138 export PATH="/usr/local/opt/openssl/bin:$PATH"
139 fi
Jean-Paul Calderonea2d7e092014-04-17 10:07:34 -0400140 fi
Paul Kehrer5488fe02015-08-31 13:46:44 -0500141 openssl version
142 ~/.venv/bin/tox -v
Jean-Paul Calderone9f2ec962014-04-16 18:32:34 -0400143
Paul Kehrer9f792f42015-04-13 18:45:56 -0400144after_script:
Hynek Schlawack42345582015-09-05 10:12:18 +0200145 - ./.travis/upload_coverage.sh
Jean-Paul Calderone9f2ec962014-04-16 18:32:34 -0400146
147notifications:
148 email: false