Add coverage reporting and uploading

Upload our coverage data to codecov.io and aggregate it on test runs.
This commit is contained in:
Ian Cordasco 2016-08-06 15:21:50 -05:00
parent d5a6cfcff9
commit b995d56e19
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
5 changed files with 63 additions and 1 deletions

11
.coveragerc Normal file
View file

@ -0,0 +1,11 @@
[run]
branch = True
source =
flake8
[paths]
source =
src/flake8
.tox/*/lib/python*/site-packages/flake8
.tox/pypy/site-packages/flake8

1
.gitignore vendored
View file

@ -10,3 +10,4 @@ dist
*.sw*
*.log
docs/build/html/*
.coverage

View file

@ -10,6 +10,10 @@ before_script:
- python get-pip.py
- pip install -r dev-requirements.txt
after_script:
- pip install codecov
- codecov --token=7d117e6b-aab6-4283-ab19-166dafc38cf5
python2:
image: python:2.7
stage: test

43
codecov.yml Normal file
View file

@ -0,0 +1,43 @@
codecov:
branch: master
bot: null
coverage:
precision: 2
round: down
range: "60...100"
notify:
irc:
default:
server: chat.freenode.net
channel: '##python-code-quality'
branches: master
threshold: 2
message: null
status:
project:
default:
target: auto
threshold: null
branches: null
patch:
default:
target: auto
branches: null
changes:
default:
branches: null
ignore: null
fixes:
- .tox
comment:
layout: "header, diff, changes, sunburst, uncovered, tree"
branches: null
behavior: default

View file

@ -6,8 +6,11 @@ envlist = py27,py33,py34,py35,flake8,linters,docs
deps =
mock
pytest
coverage
commands =
py.test {posargs}
coverage run --parallel-mode -m pytest {posargs}
coverage combine
coverage report -m
[testenv:venv]
deps =