Skip to content

Commit

Permalink
Setup coverage reporting [skip appveyor]
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Mar 23, 2019
1 parent 4ea9711 commit e0ad955
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 13 deletions.
14 changes: 14 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[run]
include =
pluggy/*
testing/*
*/lib/python*/site-packages/pluggy/*
*/pypy*/site-packages/pluggy/*
*\Lib\site-packages\pluggy\*
branch = 1

[paths]
source = pluggy/
*/lib/python*/site-packages/pluggy/
*/pypy*/site-packages/pluggy/
*\Lib\site-packages\pluggy\
28 changes: 17 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ jobs:
- python: '3.6'
env: TOXENV=docs
- python: '2.7'
env: TOXENV=py27-pytestrelease
env: TOXENV=py27-pytestrelease-coverage
- python: '3.4'
env: TOXENV=py34-pytestrelease
env: TOXENV=py34-pytestrelease-coverage
- python: '3.5'
env: TOXENV=py35-pytestrelease
env: TOXENV=py35-pytestrelease-coverage
- python: '3.6'
env: TOXENV=py36-pytestrelease
env: TOXENV=py36-pytestrelease-coverage
- python: 'pypy'
env: TOXENV=pypy-pytestrelease
env: TOXENV=pypy-pytestrelease-coverage
- python: 'pypy3.5'
env: TOXENV=pypy3-pytestrelease
env: TOXENV=pypy3-pytestrelease-coverage
- python: 'nightly'
env: TOXENV=py37-pytestrelease
env: TOXENV=py37-pytestrelease-coverage
- python: '2.7'
env: TOXENV=py27-pytestmaster
env: TOXENV=py27-pytestmaster-coverage
- python: '2.7'
env: TOXENV=py27-pytestfeatures
env: TOXENV=py27-pytestfeatures-coverage
- python: '3.6'
env: TOXENV=py36-pytestmaster
env: TOXENV=py36-pytestmaster-coverage
- python: '3.6'
env: TOXENV=py36-pytestfeatures
env: TOXENV=py36-pytestfeatures-coverage
- python: '3.6'
env: TOXENV=benchmark

Expand All @@ -61,6 +61,12 @@ install:
script:
- tox

after_script:
- |
if [[ "${TOXENV%-coverage}" != "$TOXENV" ]]; then
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -n $TOXENV
fi
notifications:
irc:
channels:
Expand Down
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
pluggy - A minimalist production ready plugin system
====================================================

|pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black|
|pypi| |conda-forge| |versions| |travis| |appveyor| |gitter| |black| |codecov|

This is the core framework used by the `pytest`_, `tox`_, and `devpi`_ projects.

Expand Down Expand Up @@ -85,6 +85,10 @@ A definitive example
.. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black

.. |codecov| image:: https://codecov.io/gh/pytest-dev/pluggy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/pytest-dev/pluggy
:alt: Code coverage Status

.. links
.. _pytest:
http://pytest.org
Expand Down
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
envlist=linting,docs,py{27,34,35,36,py,py3}-pytestrelease,py{27,36}-pytest{master,features}

[testenv]
commands=pytest {posargs:testing/}
commands=
{env:_PLUGGY_TOX_CMD:pytest} {posargs}
coverage: coverage report -m
coverage: coverage xml
setenv=
_PYTEST_SETUP_SKIP_PLUGGY_DEP=1
coverage: _PLUGGY_TOX_CMD=coverage run -m pytest
deps=
pytestrelease: pytest
pytestmaster: git+https://github.com/pytest-dev/pytest.git@master
pytestfeatures: git+https://github.com/pytest-dev/pytest.git@features
coverage: coverage

[testenv:benchmark]
commands=pytest {posargs:testing/benchmark.py}
Expand All @@ -32,6 +37,7 @@ commands =

[pytest]
minversion=2.0
testpaths = testing
#--pyargs --doctest-modules --ignore=.tox
addopts=-rxsX
norecursedirs=.tox ja .hg .env*
Expand Down

0 comments on commit e0ad955

Please sign in to comment.