diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..0a3db04a --- /dev/null +++ b/.coveragerc @@ -0,0 +1,11 @@ +[run] +branch = True +source = + flake8 + + +[paths] +source = + src/flake8 + .tox/*/lib/python*/site-packages/flake8 + .tox/pypy/site-packages/flake8 diff --git a/.gitignore b/.gitignore index baf560dd..fe893621 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ dist *.sw* *.log docs/build/html/* +.coverage diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 23c2f677..74462631 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..4098f518 --- /dev/null +++ b/codecov.yml @@ -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 + diff --git a/tox.ini b/tox.ini index 1b1895d2..d1f515b7 100644 --- a/tox.ini +++ b/tox.ini @@ -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 =