Skip to content

Commit

Permalink
Add support for codecov support (#64)
Browse files Browse the repository at this point in the history
* Add support for codecov support

@mhe setup codecov with the repository and now adding a few changes to Travis CI to integrate with Codecov.

Reference: https://github.com/codecov/codecov-python/blob/master/README.md#ci-providers

* Run coverage on tests to be uploaded to codecov

* Add codecov badge
  • Loading branch information
addisonElliott authored Aug 21, 2018
1 parent 32d8384 commit 7021a17
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
branch = true
source = nrrd
omit = nrrd/tests/*
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ MANIFEST

# Sphinx documentation
docs/build/

# coverage.py files
.coverage
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -22,3 +23,5 @@ deploy:
tags: true
python: 3.4

after_success:
- codecov
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7021a17

Please sign in to comment.