diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..36bd2d5c --- /dev/null +++ b/.coveragerc @@ -0,0 +1,25 @@ +# .coveragerc to control coverage.py +# following the example at http://nedbatchelder.com/code/coverage/config.html +[run] +branch = True +include = helpdesk/* +omit = + *helpdesk/south_migrations/* + *helpdesk/migrations/* + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Have to re-enable the standard pragma + pragma: no cover + + # Don't complain if tests don't hit defensive assertion code: + raise AssertionError + raise NotImplementedError + + # Don't complain if non-runnable code isn't run: + if 0: + if __name__ == .__main__.: + if __name__==.__main__.: + +ignore_errors = True \ No newline at end of file diff --git a/.gitignore b/.gitignore index d0c4e131..f1220a0f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ dist django_helpdesk.egg-info docs/html/* docs/doctrees/* +.coverage .project .pydevproject \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index b2c3398b..60080bd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,13 @@ matrix: install: - pip install argparse + - pip install coverage + - pip install codecov - pip install -q Django==$DJANGO - pip install -q -r requirements.txt -script: python quicktest.py helpdesk +script: + - coverage run --source='.' quicktest.py helpdesk + +after_success: + - codecov \ No newline at end of file diff --git a/README.rst b/README.rst index 5ef3174c..299013c7 100644 --- a/README.rst +++ b/README.rst @@ -4,6 +4,9 @@ django-helpdesk - A Django powered ticket tracker for small businesses. .. image:: https://travis-ci.org/django-helpdesk/django-helpdesk.png?branch=master :target: https://travis-ci.org/django-helpdesk/django-helpdesk +.. image:: https://codecov.io/gh/django-helpdesk/django-helpdesk/branch/master/graph/badge.svg + :target: https://codecov.io/gh/django-helpdesk/django-helpdesk + Copyright 2009- Ross Poulton and contributors. All Rights Reserved. See LICENSE for details. django-helpdesk was formerly known as Jutda Helpdesk, named after the @@ -98,7 +101,4 @@ https://www.transifex.com/django-helpdesk/django-helpdesk/ Feel free to request access to contribute your translations. -Pull requests for all other changes are welcome. We're currently trying to add test cases wherever possible, so please continue to include tests with pull requests. - -.. image:: https://secure.travis-ci.org/django-helpdesk/django-helpdesk.png?branch=master - :target: https://travis-ci.org/django-helpdesk/django-helpdesk +Pull requests for all other changes are welcome. We're currently trying to add test cases wherever possible, so please continue to include tests with pull requests. \ No newline at end of file