Skip to content

Commit

Permalink
add coveralls support
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed Jan 21, 2016
1 parent aefe501 commit fb9862d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .coveragerc
@@ -0,0 +1,2 @@
[run]
include = */denorm/*
4 changes: 4 additions & 0 deletions .travis.yml
@@ -1,6 +1,7 @@
language: python
install:
- pip install tox
- pip install coveralls
before_script:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'create database denorm_test;' -U postgres; fi;"

Expand Down Expand Up @@ -88,3 +89,6 @@ matrix:
- env: DJANGO=djangomaster DB=mysql
- env: DJANGO=djangomaster DB=postgres
- env: DJANGO=djangomaster DB=postgis
after_script:
- cd test_denorm_project/
- coveralls --rcfile=../.coveragerc
2 changes: 1 addition & 1 deletion runtests.py
Expand Up @@ -14,5 +14,5 @@
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_denorm_project.settings_%s' % dbtype

test_label = sys.argv[2] if len(sys.argv) > 2 else "test_app"
if os.system("cd test_denorm_project; python -Wall manage.py test %s" % test_label):
if os.system("cd test_denorm_project; coverage run manage.py test %s" % test_label):
exit(1)
1 change: 1 addition & 0 deletions tox.ini
Expand Up @@ -4,6 +4,7 @@ envlist = {py26,py27,py34}-django{15,16,17,18,19,master}-{sqlite,mysql,postgres,

[testenv]
commands =
pip install coverage
sqlite: python runtests.py sqlite
mysql: python runtests.py mysql
postgres: python runtests.py postgres
Expand Down

0 comments on commit fb9862d

Please sign in to comment.