Commit 18819bda authored by Pierre Augier's avatar Pierre Augier
Browse files

tox

parent e42879c6aa1b
......@@ -8,11 +8,11 @@ black:
tests:
pytest -s
_tests_coverage:
tests_coverage:
mkdir -p .coverage
coverage run -p -m pytest
_report_coverage:
report_coverage:
coverage combine
coverage report
coverage html
......@@ -20,4 +20,4 @@ _report_coverage:
@echo "Code coverage analysis complete. View detailed report:"
@echo "file://${PWD}/.coverage/index.html"
coverage: _tests_coverage _report_coverage
coverage: tests_coverage report_coverage
# Tox (http://tox.testrun.org/) is a tool for running tests in
# multiple virtualenvs. This configuration file will run the test
# suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
# http://tox.readthedocs.io/en/latest/config.html
#
# To run tox faster, check out Detox
# (https://pypi.python.org/pypi/detox), which runs your tox runs in
# parallel. To use it, "pip install detox" and then run "detox" from
# this directory.
[tox]
envlist =
python{3.6,3.7}, pypy3.5-6.0.0
codecov
[testenv]
sitepackages = True
deps =
coverage
pytest
whitelist_externals = make
commands =
make tests_coverage
[testenv:codecov]
passenv = CODECOV_TOKEN
sitepackages = True
deps = codecov
whitelist_externals = make
skip_install = true
commands =
make report_coverage
codecov --file .coverage/coverage.xml
[testenv:codecov-travis]
passenv = CI TRAVIS TRAVIS_*
deps = codecov
skip_install = true
commands =
make report_coverage
codecov --file .coverage/coverage.xml
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment