diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..f28644f --- /dev/null +++ b/.coveragerc @@ -0,0 +1,4 @@ +[run] +branch = true +source = nrrd +omit = nrrd/tests/* diff --git a/.gitignore b/.gitignore index a457871..dd13bb3 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ MANIFEST # Sphinx documentation docs/build/ + +# coverage.py files +.coverage \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5ea64b0..a7a68f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,9 +7,10 @@ python: # Command to install dependencies install: - pip install -r requirements.txt + - pip install codecov # Command to run tests -script: python -m unittest discover -v nrrd/tests +script: coverage run -m unittest discover -v nrrd/tests # Command to deploy releases to PyPi deploy: @@ -22,3 +23,5 @@ deploy: tags: true python: 3.4 +after_success: + - codecov diff --git a/README.rst b/README.rst index 345fc5d..93924b4 100644 --- a/README.rst +++ b/README.rst @@ -18,6 +18,9 @@ :target: https://pynrrd.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status +.. image:: https://codecov.io/gh/mhe/pynrrd/branch/master/graph/badge.svg + :target: https://codecov.io/gh/mhe/pynrrd + | pynrrd