From 911e7044ed3284a3ec6b10dd5250d600c899ea78 Mon Sep 17 00:00:00 2001 From: Bernat Gabor Date: Sun, 10 Jun 2018 09:55:42 +0100 Subject: [PATCH] fix coverage --- tox.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index ad5ddb0bbd..29b0b22767 100644 --- a/tox.ini +++ b/tox.ini @@ -47,18 +47,18 @@ commands = pre-commit run --all-files --show-diff-on-failure [testenv:coverage] -description = [run locally after tests]: combine coverage data and create reports +description = [run locally after tests]: combine coverage data and create report; + generates a diff coverage against origin/master (can be changed by setting DIFF_AGAINST env var) deps = {[testenv]deps} coverage >= 4.4.1, < 5 - diff_cover skip_install = True setenv = COVERAGE_FILE={toxworkdir}/.coverage changedir = {toxinidir} commands = coverage erase coverage combine coverage report -m - coverage xml - diff-cover --compare-branch upstream/master {toxworkdir}/coverage.xml + coverage xml -o {toxworkdir}/coverage.xml + diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml [testenv:codecov] description = [only run on CI]: upload coverage data to codecov (depends on coverage running first)