-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
90 lines (64 loc) · 1.64 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
[tox]
envlist =
coverage-py{36,37,38}-ts
coverage_report
skip_missing_interpreters = {tty:True:False}
[default]
basepython = python3.7
setenv =
PY_MODULE=treesapp
[travis]
python =
3.6: py36
3.7: py37, coverage_report
3.8: py38
[testenv]
description = run tests
basepython =
py36: python3.6
py37: python3.7
py38: python3.8
passenv =
# See https://github.com/codecov/codecov-python/blob/master/README.md#using-tox
# And CI-specific docs:
# https://help.github.com/en/articles/virtual-environments-for-github-actions#default-environment-variables
# https://docs.travis-ci.com/user/environment-variables#default-environment-variables
TOXENV CODECOV_* CI
GITHUB_*
TRAVIS TRAVIS_*
deps=
.[tests]
codecov>=2.0.0
setuptools>=50.3.1
setenv =
{[default]setenv}
coverage: COVERAGE_FILE={toxworkdir}/coverage.{envname}
commands=
pip install --upgrade pip
pip install --upgrade pytest
pip install -r requirements.txt
# Run trial with coverage
coverage: coverage run --source {env:PY_MODULE} -m pytest --capture=tee-sys
# Run coverage reports, ignore exit status
coverage: - coverage report --skip-empty
extras = tests
##
# Coverage report
##
[testenv:coverage_report]
description = generate coverage report
depends = {test,coverage}-py37-ts
basepython = {[default]basepython}
passenv = TOXENV CI TRAVIS TRAVIS_* CODECOV_*
skip_install = True
deps =
codecov>=2.0.0
coverage==5.0.3
setuptools>=50.3.1
setenv =
{[default]setenv}
COVERAGE_FILE={toxworkdir}/coverage
commands =
coverage combine
- coverage report
- coverage xml