From 4274f1595413d345842157fbf2554e6508db75cc Mon Sep 17 00:00:00 2001 From: Bjarni Jens Kristinsson Date: Wed, 5 Jun 2019 15:04:55 +0000 Subject: [PATCH] Code coverage badge using Coveralls.io running in CI loop --- .travis.yml | 10 ++++++++++ README.rst | 3 +++ setup.cfg | 2 +- setup.py | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index af9723dce..16a3be40f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,5 +11,15 @@ python: - 'nightly' - 'pypy3.5' +install: + - pip install --upgrade pip + - pip install coveralls==1.7.0 + script: - ./setup.py test + +after_success: + - coveralls + +notifications: + email: false diff --git a/README.rst b/README.rst index 486daf429..99a47cd99 100644 --- a/README.rst +++ b/README.rst @@ -3,6 +3,9 @@ Combinatorial Specification Searcher .. image:: https://travis-ci.org/PermutaTriangle/comb_spec_searcher.svg?branch=master :alt: Travis :target: https://travis-ci.org/PermutaTriangle/comb_spec_searcher +.. image:: https://img.shields.io/coveralls/github/PermutaTriangle/comb_spec_searcher.svg + :alt: Coveralls + :target: https://coveralls.io/github/PermutaTriangle/comb_spec_searcher .. image:: https://img.shields.io/pypi/v/comb_spec_searcher.svg :alt: PyPI :target: https://pypi.python.org/pypi/comb_spec_searcher diff --git a/setup.cfg b/setup.cfg index 374cf73e2..d654801cf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ test=pytest [tool:pytest] -addopts = --verbose --pep8 --isort +addopts = --pep8 --isort --cov=comb_spec_searcher --cov-report=term-missing testpaths = comb_spec_searcher test_readme.txt [tool:isort] diff --git a/setup.py b/setup.py index 5b362d848..2d4b721dc 100755 --- a/setup.py +++ b/setup.py @@ -49,6 +49,7 @@ def read(fname): setup_requires=['pytest-runner'], tests_require=[ 'pytest', + 'pytest-cov', 'pytest-isort', 'pytest-pep8', 'docutils-python3',