1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-08 16:53:23 +00:00

Add travis testing support for python 3.8 (#477)

* Add travis testing support for python 3.8

* Use Xenial for all

* Simplify matrix

* Consistent indents

* Add py38 to tox and update contributing guide for how to use pyenv

* Fix travis spec to allow 3.8-dev to fail and tox should pass 90% coverage for full suite
This commit is contained in:
Josh Peak
2019-08-25 20:50:48 +10:00
committed by GitHub
parent 7caf29735a
commit c5c120e91b
4 changed files with 57 additions and 41 deletions

2
.gitignore vendored
View File

@@ -10,6 +10,8 @@ coverage.xml
htmlcov/
*.egg-info/
pytestdebug.log
pip-wheel-metadata/
.python-version
fixtures/
/docs/_build

View File

@@ -1,3 +1,4 @@
dist: xenial
language: python
before_install: openssl version
env:
@@ -13,55 +14,31 @@ env:
- TOX_SUFFIX="aiohttp"
matrix:
include:
# Only run lint on a single 3.x
- env: TOX_SUFFIX="lint"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="requests"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="httplib2"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="boto3"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="urllib3"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="tornado4"
python: 3.7
dist: xenial
- env: TOX_SUFFIX="aiohttp"
python: 3.7
dist: xenial
python: "3.7"
allow_failures:
- env: TOX_SUFFIX="aiohttp"
python: "pypy3"
- python: "3.8-dev"
exclude:
# Only run lint on a single 3.x
- env: TOX_SUFFIX="lint"
python: 2.7
- env: TOX_SUFFIX="lint"
python: 3.5
- env: TOX_SUFFIX="lint"
python: pypy
- env: TOX_SUFFIX="lint"
python: "pypy3"
# Exclude aiohttp support
- env: TOX_SUFFIX="aiohttp"
python: 2.7
python: "2.7"
- env: TOX_SUFFIX="aiohttp"
python: pypy
python: "pypy"
python:
- 2.7
- 3.5
- 3.6
- pypy
- "pypy3"
- "2.7"
- "3.5"
- "3.6"
- "3.7"
- "3.8-dev"
- "pypy"
- "pypy3"
install:
- pip install tox-travis codecov
- if [[ $TOX_SUFFIX != 'lint' ]]; then python setup.py install ; fi
- pip install tox-travis codecov
- if [[ $TOX_SUFFIX != 'lint' ]]; then python setup.py install ; fi
script:
- tox -e "${TOX_SUFFIX}"
- tox -e "${TOX_SUFFIX}"
after_success:
- codecov

View File

@@ -27,6 +27,38 @@ for how to set this up. I have marked the boto tests as optional in
Travis so you don't have to worry about them failing if you submit a
pull request.
Using PyEnv with VCR's test suite
---------------------------------
PyEnv is a tool for managing multiple installation of python on your system.
See the full documentation at their `github <https://github.com/pyenv/pyenv>`
but we are also going to use `tox-pyenv <https://pypi.org/project/tox-pyenv/>`
in this example::
git clone https://github.com/pyenv/pyenv ~/.pyenv
# Add ~/.pyenv/bin to your PATH
export PATH="$PATH:~/.pyenv/bin"
# Setup shim paths
eval "$(pyenv init -)"
# Setup your local system tox tooling
pip install tox tox-pyenv
# Install supported versions (at time of writing), this does not activate them
pyenv install 2.7.10 3.5.7 3.6.9 3.7.4 3.8-dev pypy2.6-7.1.1 pypy3.6-7.1.1
# This activates them
pyenv local 2.7.10 3.5.7 3.6.9 3.7.4 3.8-dev pypy2.6-7.1.1 pypy3.6-7.1.1
# Run the whole test suite
tox
# Run the whole test suite or just part of it
tox -e lint
tox -e py37-requests
Troubleshooting on MacOSX
-------------------------

View File

@@ -1,6 +1,11 @@
[tox]
skip_missing_interpreters=true
envlist = cov-clean,{py27,py35,py36,py37,pypy}-{lint,requests,httplib2,urllib3,tornado4,boto3},{py35,py36,py37}-{aiohttp},cov-report
envlist =
cov-clean,
lint,
{py27,py35,py36,py37,py38,pypy,pypy3}-{requests,httplib2,urllib3,tornado4,boto3},
{py35,py36,py37,py38}-{aiohttp},
cov-report
# Coverage environment tasks: cov-clean and cov-report
@@ -15,7 +20,7 @@ deps = coverage
skip_install=true
commands =
coverage html
coverage report --fail-under=80
coverage report --fail-under=90
[testenv:lint]
skipsdist = True