Skip to content

Commit

Permalink
Add coverage reporting and uploading
Browse files Browse the repository at this point in the history
Upload our coverage data to codecov.io and aggregate it on test runs.
  • Loading branch information
sigmavirus24 committed Aug 6, 2016
1 parent d5a6cfc commit b995d56
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ dist
*.sw*
*.log
docs/build/html/*
.coverage
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
43 changes: 43 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -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

5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit b995d56

Please sign in to comment.