-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
77 lines (69 loc) · 2.18 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
[tox]
mintoxversion = 2.3
envlist = check_readme, covclean, py38, integrationtests
[testenv]
basepython = python3.8
passenv = LANG TERM LANGUAGE LC_ALL LD_LIBRARY_PATH GSY_FRAMEWORK_BRANCH
commands_pre =
pip install --upgrade pip
pip install -rrequirements/tests.txt
pip install -e .
[flake8]
exclude = .tox,wiki,.cache,.hypothesis,.pytest_cache,vagrant,requirements,steps,setups
max-line-length = 99
[testenv:coverage]
skip_install = true
deps = coverage
commands =
coverage run -m pytest unit_tests/ --random-order {posargs:tests}
coverage combine
coverage xml
coverage report
[testenv:covclean]
skip_install = true
deps = {[testenv:coverage]deps}
commands = coverage erase
[testenv:integrationtests]
passenv = {[testenv]passenv} INTEGRATION_TESTS_REPO INTEGRATION_TESTS_BRANCH GSY_E_TARGET_BRANCH GSY_E_TARGET_REPO
allowlist_externals =
git
/bin/ln
/bin/rm
commands_pre =
{[testenv]commands_pre}
git clone \
-b {env:INTEGRATION_TESTS_BRANCH:master} \
{env:INTEGRATION_TESTS_REPO:[email protected]:gridsingularity/gsy-backend-integration-tests.git} \
{envtmpdir}/gsy-backend-integration-tests
ln -sf {envtmpdir}/gsy-backend-integration-tests/gsy_matching_engine_sdk_tests/integration_tests/ ./integration_tests
ln -sf {envtmpdir}/gsy-backend-integration-tests/docker_compose/ ./docker_compose
commands =
behave ./integration_tests {posargs}
commands_post =
rm ./integration_tests
rm ./docker_compose
[testenv:unittests]
commands =
pytest unit_tests/ --random-order {posargs:tests}
[testenv:check_readme]
skip_install = true
deps = readme_renderer
commands = python setup.py check --restructuredtext --strict
[testenv:ci]
passenv = {[testenv:integrationtests]passenv}
allowlist_externals =
{[testenv:integrationtests]allowlist_externals}
setenv =
PYTHONPATH = {toxinidir}
deps =
{[testenv:coverage]deps}
commands_pre =
python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)"
{[testenv:integrationtests]commands_pre}
commands =
flake8
# {[testenv:coverage]commands}
# {[testenv:unittests]commands}
behave ./integration_tests/ --stop
commands_post =
{[testenv:integrationtests]commands_post}