diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..0b371a0 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,13 @@ +[run] +branch = False +source = anticipy + +[report] +exclude_lines = + if self.debug: + pragma: no cover + raise NotImplementedError + if __name__ == .__main__.: +ignore_errors = True +omit = + tests/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index eaf569c..7626830 100644 --- a/.gitignore +++ b/.gitignore @@ -19,5 +19,6 @@ deactivate.* config.local.* setup.py~ .idea/ +htmlcov/ docs/source/.static/ *.png diff --git a/.travis.yml b/.travis.yml index 3520aa2..e4ce8b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -51,7 +51,11 @@ install: fi - python --version - pip install . + - pip install codecov script: - - python -m unittest discover + - coverage run -m unittest discover - pycodestyle ./ --ignore=E402,W + +after_success: + - codecov diff --git a/README.md b/README.md index 49ab7c5..596c432 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ [![Latest Release](https://img.shields.io/pypi/v/anticipy.svg)](https://img.shields.io/pypi/v/anticipy.svg) [![Build Status](https://travis-ci.com/sky-uk/anticipy.svg?branch=master)](https://travis-ci.com/sky-uk/anticipy) [![Documentation Status](https://readthedocs.org/projects/anticipy/badge/?version=latest)](https://anticipy.readthedocs.io/en/latest/?badge=latest) - +[![Code Coverage](https://codecov.io/github/sky-uk/anticipy/branch/master/graph/badge.svg)](https://codecov.io/github/sky-uk/anticipy/) # Anticipy