diff --git a/.travis.yml b/.travis.yml index accafd46f..92ee7eddb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,8 @@ install: script: - cd src/ - - pytest + - pytest --cov - pycodestyle + +after_success: - coveralls diff --git a/Pipfile b/Pipfile index ac1210a7f..c261774e7 100644 --- a/Pipfile +++ b/Pipfile @@ -30,6 +30,7 @@ python-gnupg = "*" pytz = "*" pycodestyle = "*" pytest = "*" +pytest-cov = "*" pytest-django = "*" pytest-sugar = "*" pytest-env = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 001d69919..b22a0fd2b 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "55577c514e3544ebc24932836e0c06939bc0da36b29733be8e8f168394bf937d" + "sha256": "aea42201a211f2a064243b83231fc7e38760f88d620ab6e888512940e715eeaf" }, "host-environment-markers": { "implementation_name": "cpython", @@ -324,6 +324,13 @@ ], "version": "==3.4.1" }, + "pytest-cov": { + "hashes": [ + "sha256:890fe5565400902b0c78b5357004aab1c814115894f4f21370e2433256a3eeec", + "sha256:03aa752cf11db41d281ea1d807d954c4eda35cfa1b21d6971966cc041bbf6e2d" + ], + "version": "==2.5.1" + }, "pytest-django": { "hashes": [ "sha256:00995c2999b884a38ae9cd30a8c00ed32b3d38c1041250ea84caf18085589662", diff --git a/requirements.txt b/requirements.txt index 3b713e63e..2ace94306 100644 --- a/requirements.txt +++ b/requirements.txt @@ -31,6 +31,7 @@ pycodestyle==2.3.1 pyflakes==1.6.0 pyocr==0.5 pytest==3.4.1 +pytest-cov==2.5.1 pytest-django==3.1.2 pytest-env==0.6.2 pytest-forked==0.2 diff --git a/src/setup.cfg b/src/setup.cfg index ed8efebfb..e70395525 100644 --- a/src/setup.cfg +++ b/src/setup.cfg @@ -11,5 +11,9 @@ env = PAPERLESS_SECRET=paperless PAPERLESS_EMAIL_SECRET=paperless -[coverage:paths] -source = ./ + +[coverage:run] +source = + ./ +omit = + */tests