diff --git a/tests/unit/coveralls.py b/tests/unit/coveralls.py index ef41fda8b..eddeac46b 100644 --- a/tests/unit/coveralls.py +++ b/tests/unit/coveralls.py @@ -8,7 +8,7 @@ # Solution provided by https://stackoverflow.com/questions/32757765/conditional-commands-in-tox-tox-travis-ci-and-coveralls if __name__ == '__main__': - if 'TRAVIS' in os.environ: + if 'COVERALLS_REPO_TOKEN' in os.environ: rc = call('coveralls') sys.stdout.write("Coveralls report from CI.\n") # raise SystemExit(rc) diff --git a/tox.ini b/tox.ini index db04b1ed8..b1a4438a5 100644 --- a/tox.ini +++ b/tox.ini @@ -20,12 +20,13 @@ commands = flake8 . [testenv:unit_tests] passenv = COVERALLS_REPO_TOKEN -deps = coverage +deps = + coverage==4.5.4 -rrequirements.txt -rtests/unit/requirements.txt commands = coverage run -m pytest -x tests/unit coverage report - coveralls + python tests/unit/coveralls.py [gh-actions] python =