# Note: Run "python bootstrap.py" before running Tox, to generate metadata.
#
# To run Tox against all supported Python interpreters, you can set:
#
# export TOXENV='py27,py3{3,4,5,6},pypy,pypy3'

[testenv]
deps=-rtests/requirements.txt
setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR
# These are separate so xfail tests don't count towards code coverage
commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools}
         pytest -m "xfail"  {posargs: "{toxinidir}"}
usedevelop=True


[testenv:coverage]
description=Combine coverage data and create reports
deps=coverage
skip_install=True
changedir={toxworkdir}
setenv=COVERAGE_FILE=.coverage
commands=coverage erase
         coverage combine
         coverage report --rcfile={toxinidir}/tox.ini
         coverage xml

[testenv:codecov]
description=[Only run on CI]: Upload coverage data to codecov
deps=codecov
skip_install=True
commands=codecov --file {toxworkdir}/coverage.xml

[coverage:run]
source=setuptools

[coverage:report]
skip_covered=True
show_missing=True

# Note: Run "python bootstrap.py" before running Tox, to generate metadata.
#
# To run Tox against all supported Python interpreters, you can set:
#
# export TOXENV='py27,py3{3,4,5,6},pypy,pypy3'

[testenv]
deps=-rtests/requirements.txt
setenv=COVERAGE_FILE={toxworkdir}/.coverage.{envname}
passenv=APPDATA USERPROFILE HOMEDRIVE HOMEPATH windir APPVEYOR APPVEYOR_* CI CODECOV_* TRAVIS TRAVIS_*
# These are separate so xfail tests don't count towards code coverage
commands=pytest -m "not xfail" {posargs: "{toxinidir}" --cov-config={toxinidir}/tox.ini --cov=setuptools}
         pytest -m "xfail"  {posargs: "{toxinidir}"}
usedevelop=True


[testenv:coverage]
description=Combine coverage data and create reports
deps=coverage
skip_install=True
changedir={toxworkdir}
setenv=COVERAGE_FILE=.coverage
commands=coverage erase
         coverage combine
         coverage report --rcfile={toxinidir}/tox.ini
         coverage xml

[testenv:codecov]
description=[Only run on CI]: Upload coverage data to codecov
deps=codecov
skip_install=True
commands=codecov --file {toxworkdir}/coverage.xml

[coverage:run]
source=setuptools

[coverage:report]
skip_covered=True
show_missing=True

Add travis, appveyor and codecov passenvs
Add travis, appveyor and codecov passenvs

Some of these environment variables are necessary codecov to
detect that it is on travis/appveyor and thus doesn't need
an upload token.
