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

Collect and aggregate code coverage across all test environments (#460)

* Collect and aggregate code coverage across all test environments

Add Coveralls badge to readme

Try CodeCov integration

Setup coverage badge for CodeCov

Fix CodeCov Badge

* Set code coverage regression threshold

Attempt to cache bust some boto3 issues on TravisCI

* Disable legacy secure strings

* Skip boto3 tests on TRAVIS_PULL_REQUEST due to credentials being unavailable

Address flake8 issues

Debug TRAVIS_PULL_REQUEST ENV Var

Trying to get boto3 tests to skip on forked PRs

boto3 is not an allowed failure

remove TRAVIS ENV debugging

* remove pytest skipif that wasn't working

* Ignore coverage files
This commit is contained in:
Josh Peak
2019-08-06 16:41:42 +10:00
committed by GitHub
parent caa3a67bde
commit cc752cf790
6 changed files with 56 additions and 9 deletions

27
tox.ini
View File

@@ -1,5 +1,21 @@
[tox]
envlist = {py27,py35,py36,py37,pypy}-{flakes,requests,httplib2,urllib3,tornado4,boto3},{py35,py36,py37}-{aiohttp}
skip_missing_interpreters=true
envlist = cov-clean,{py27,py35,py36,py37,pypy}-{flakes,requests,httplib2,urllib3,tornado4,boto3},{py35,py36,py37}-{aiohttp},cov-report
# Coverage environment tasks: cov-clean and cov-report
# https://pytest-cov.readthedocs.io/en/latest/tox.html
[testenv:cov-clean]
deps = coverage
skip_install=true
commands = coverage erase
[testenv:cov-report]
deps = coverage
skip_install=true
commands =
coverage html
coverage report --fail-under=75
[testenv:flakes]
skipsdist = True
@@ -10,8 +26,11 @@ commands =
deps = flake8
[testenv]
# Need to use develop install so that paths
# for aggregate code coverage combine
usedevelop=true
commands =
./runtests.sh --cov={envsitepackagesdir}/vcr --cov-branch {posargs}
./runtests.sh --cov=./vcr --cov-branch --cov-report=xml --cov-append {posargs}
deps =
Flask
mock
@@ -31,9 +50,13 @@ deps =
aiohttp: aiohttp
aiohttp: pytest-asyncio
aiohttp: pytest-aiohttp
depends =
{py27,py35,py36,py37,pypy}-{flakes,requests,httplib2,urllib3,tornado4,boto3},{py35,py36,py37}-{aiohttp}: cov-clean
cov-report: {py27,py35,py36,py37,pypy}-{flakes,requests,httplib2,urllib3,tornado4,boto3},{py35,py36,py37}-{aiohttp}
passenv =
AWS_ACCESS_KEY_ID
AWS_DEFAULT_REGION
AWS_SECRET_ACCESS_KEY
[flake8]
max_line_length = 110