forked from ethereum/trinity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
154 lines (133 loc) · 5.88 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
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
149
150
151
152
153
154
[tox]
envlist=
py{36,37}-{eth1-core,p2p,integration,lightchain_integration,eth2-core,eth2-fixtures,eth2-integration,plugins}
py36-long_run_integration
py36-rpc-blockchain
py36-rpc-state-{frontier,homestead,tangerine_whistle,spurious_dragon,byzantium,constantinople,petersburg}
py37-rpc-state-{quadratic,sstore,zero_knowledge}
py{36,37}-libp2p
py{36,37}-lint
py{36,37}-wheel-cli
py36-docs
[flake8]
max-line-length= 100
exclude=
ignore=
[testenv]
usedevelop=True
passenv =
TRAVIS_EVENT_TYPE
commands=
eth1-core: pytest -n 4 {posargs:tests/core/}
eth2-core: pytest -n 4 {posargs:tests/eth2/core/}
eth2-fixtures: pytest -n 4 {posargs:tests/eth2/fixtures-tests/}
eth2-integration: pytest -n 4 {posargs:tests/eth2/integration/}
p2p: pytest -n 4 {posargs:tests/p2p}
plugins: pytest -n 4 {posargs:tests/plugins/}
rpc-blockchain: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'not GeneralStateTests'}
# Fork/VM-specific state transition tests; long-running categories run separately!
rpc-state-frontier: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork Frontier -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
rpc-state-homestead: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork Homestead -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
rpc-state-tangerine_whistle: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork EIP150 -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
rpc-state-spurious_dragon: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork EIP158 -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
# The following test seems to consume a lot of memory. Restricting to 3 processes reduces crashes
rpc-state-byzantium: pytest -n 3 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork Byzantium -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
rpc-state-constantinople: pytest -n 3 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork Constantinople -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
rpc-state-petersburg: pytest -n 3 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py --fork ConstantinopleFix -k 'GeneralStateTests and not stQuadraticComplexityTest and not stSStoreTest and not stZeroKnowledge'}
# Long-running categories.
rpc-state-quadratic: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and stQuadraticComplexityTest'}
rpc-state-sstore: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and stSStoreTest'}
rpc-state-zero_knowledge: pytest -n 4 {posargs:tests/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and stZeroKnowledge'}
lightchain_integration: pytest --integration {posargs:tests/integration/test_lightchain_integration.py}
deps = .[p2p,trinity,eth2,test]
basepython =
py36: python3.6
py37: python3.7
[testenv:py36-docs]
whitelist_externals=
make
deps = .[p2p, trinity, eth2, doc]
passenv =
TRAVIS_EVENT_TYPE
commands=
make validate-docs
[common-wheel-cli]
deps=
pexpect
pytest
pytest-asyncio
wheel
whitelist_externals=
/bin/rm
/bin/bash
/bin/cd
commands=
/bin/rm -rf build dist
python setup.py sdist bdist_wheel
/bin/bash -c 'pip install --upgrade "$(ls dist/*.whl)""[p2p,trinity]"'
pytest {posargs:tests/integration/ -k 'trinity_cli'}
[testenv:py36-wheel-cli]
deps = {[common-wheel-cli]deps}
whitelist_externals = {[common-wheel-cli]whitelist_externals}
commands = {[common-wheel-cli]commands}
skip_install=true
use_develop=false
[testenv:py37-wheel-cli]
deps = {[common-wheel-cli]deps}
whitelist_externals = {[common-wheel-cli]whitelist_externals}
commands = {[common-wheel-cli]commands}
skip_install=true
use_develop=false
[common-integration]
deps = .[p2p,trinity,eth2,test]
passenv =
TRAVIS_EVENT_TYPE
commands=
pip install -e {toxinidir}/trinity-external-plugins/examples/peer_count_reporter
# We don't want to run these tests concurrently to avoid running into errors
# due to multiple Trinity instances competing for the same ports
pytest --integration -n 1 {posargs:tests/integration/ -k 'not lightchain_integration'}
[testenv:py36-integration]
deps = {[common-integration]deps}
passenv = {[common-integration]passenv}
commands = {[common-integration]commands}
[testenv:py37-integration]
deps = {[common-integration]deps}
passenv = {[common-integration]passenv}
commands = {[common-integration]commands}
[testenv:py36-long_run_integration]
deps = {[common-integration]deps}
passenv = {[common-integration]passenv}
commands =
pytest -n 1 {posargs:tests/trinity_long_run/}
[libp2p]
deps = .[libp2p,test]
passenv =
TRAVIS_EVENT_TYPE
commands =
pytest -n 1 {posargs:tests/libp2p}
[testenv:py36-libp2p]
deps = {[libp2p]deps}
passenv = {[libp2p]passenv}
commands = {[libp2p]commands}
[testenv:py37-libp2p]
deps = {[libp2p]deps}
passenv = {[libp2p]passenv}
commands = {[libp2p]commands}
[common-lint]
deps = .[p2p,trinity,lint,eth2,libp2p]
commands=
flake8 {toxinidir}/p2p
flake8 {toxinidir}/tests
flake8 {toxinidir}/trinity
flake8 {toxinidir}/scripts
flake8 {toxinidir}/eth2
flake8 {toxinidir}/setup.py
flake8 --exclude={toxinidir}/libp2p/p2pclient/pb {toxinidir}/libp2p
mypy -p p2p -p trinity -p eth2 -p libp2p --config-file {toxinidir}/mypy.ini
[testenv:py36-lint]
deps = {[common-lint]deps}
commands= {[common-lint]commands}
[testenv:py37-lint]
deps = {[common-lint]deps}
commands= {[common-lint]commands}