-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtox.ini
More file actions
148 lines (128 loc) · 4.07 KB
/
tox.ini
File metadata and controls
148 lines (128 loc) · 4.07 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
[tox]
envlist =
py{3.10,3.11,3.12}-build_eth_rpc,
py{3.10,3.11,3.12}-build_eth_typeshed,
py{3.10,3.11,3.12}-build_eth_protocols,
py{3.10,3.11,3.12}-build_eth_streams,
py{3.10,3.11,3.12}-test_eth_rpc,
py{3.10,3.11,3.12}-test_eth_typeshed,
py{3.10,3.11,3.12}-test_eth_protocols,
py{3.10,3.11,3.12}-test_eth_streams,
lint
isolated_build = True
[testenv]
passenv = ALCHEMY_KEY
[testenv:py{3.10,3.11,3.12}-build_eth_rpc]
description = Build the eth-rpc package.
changedir = packages/eth_rpc
allowlist_externals = sh
deps = build
extras = build
commands =
sh -c "export PACKAGE_VERSION=$(python {toxinidir}/get_version.py) && python -m build"
[testenv:py{3.10,3.11,3.12}-build_eth_typeshed]
description = Build the eth-typeshed package.
changedir = packages/eth_typeshed
allowlist_externals = sh
deps = build
extras = build
commands =
sh -c "export PACKAGE_VERSION=$(python {toxinidir}/get_version.py) && python -m build"
[testenv:py{3.10,3.11,3.12}-build_eth_protocols]
description = Build the eth-protocols package.
changedir = packages/eth_protocols
allowlist_externals = sh
deps = build
extras = build
commands =
sh -c "export PACKAGE_VERSION=$(python {toxinidir}/get_version.py) && python -m build"
[testenv:py{3.10,3.11,3.12}-build_eth_streams]
description = Build the eth-streams package.
changedir = packages/eth_streams
allowlist_externals = sh
deps = build
extras = build
commands =
sh -c "export PACKAGE_VERSION=$(python {toxinidir}/get_version.py) && python -m build"
[testenv:lint]
description = Run static checkers.
changedir = {toxinidir}
allowlist_externals = black, isort
extras = lint
deps =
black
isort
commands =
black . --check
isort . --check-only
[testenv:format]
description = Format code.
extras = lint
changedir = {toxinidir}
allowlist_externals = black, isort
deps =
black
isort
commands =
black .
isort .
[testenv:py{3.10,3.11,3.12}-test_eth_rpc]
setenv =
PYTHONPATH = ./src
commands_pre =
pip install .[test]
changedir = packages/eth_rpc
commands = pytest {posargs} --cov=eth_rpc --cov-report=xml:.reports/coverage.xml.{envname} --junitxml={toxinidir}/.reports/pytest.xml.{envname} {posargs}
[testenv:py{3.10,3.11,3.12}-test_eth_typeshed]
setenv =
PYTHONPATH = ./src
commands_pre =
pip install {toxinidir}/packages/eth_rpc
pip install .[test]
changedir = packages/eth_typeshed
commands = pytest {posargs} --cov=eth_typeshed --cov-report=xml:.reports/coverage.xml.{envname} --junitxml={toxinidir}/.reports/pytest.xml.{envname} {posargs}
[testenv:py{3.10,3.11,3.12}-test_eth_protocols]
setenv =
PYTHONPATH = ./src
commands_pre =
pip install {toxinidir}/packages/eth_rpc
pip install {toxinidir}/packages/eth_typeshed
pip install .[test]
changedir = packages/eth_protocols
commands = pytest {posargs} --cov=eth_protocols --cov-report=xml:.reports/coverage.xml.{envname} --junitxml={toxinidir}/.reports/pytest.xml.{envname} {posargs}
[testenv:py{3.10,3.11,3.12}-test_eth_streams]
setenv =
PYTHONPATH = ./src
commands_pre =
pip install {toxinidir}/packages/eth_rpc
pip install {toxinidir}/packages/eth_typeshed
pip install {toxinidir}/packages/eth_protocols
pip install .[test]
changedir = packages/eth_streams
commands = pytest {posargs} --cov=eth_streams --cov-report=xml:.reports/coverage.xml.{envname} --junitxml={toxinidir}/.reports/pytest.xml.{envname} {posargs}
[testenv:combine_test_reports]
description = Combine test and coverage data from multiple test runs.
skip_install = true
setenv =
COVERAGE_FILE = .reports/.coverage
depends =
py{3.10,3.11,3.12}-test_eth_rpc,
py{3.10,3.11,3.12}-test_eth_typeshed,
py{3.10,3.11,3.12}-test_eth_protocols,
py{3.10,3.11,3.12}-test_eth_streams
deps =
junitparser
coverage[toml]
commands =
junitparser merge --glob .reports/pytest.xml.* .reports/pytest.xml
coverage combine --keep
coverage html
[testenv:test_all]
description = Run all tests in parallel.
allowlist_externals = tox
skip_install = true
commands = tox -p
[testenv:docs]
description = Test and build the docs.
extras = docs
commands =