generated from Jsn2win/mergify-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
120 lines (107 loc) · 2.82 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
[tox]
envlist = py38,pep8
skipsdist = true
[testenv]
setenv =
MERGIFYENGINE_TEST_SETTINGS=fake.env
usedevelop = true
extras = test
# Now that the engine is setup, install the hardcoded requirement list
commands_pre = pip install -r requirements.txt
commands =
pifpaf run -g MERGIFYENGINE_STORAGE_URL redis --port 6363 -- pifpaf run -g MERGIFYENGINE_STREAM_URL redis --port 6365 -- pytest -v --pyargs mergify_engine {posargs}
[testenv:cover]
commands =
pifpaf run -g MERGIFYENGINE_STORAGE_URL redis --port 6363 -- pifpaf run -g MERGIFYENGINE_STREAM_URL redis --port 6365 -- pytest -v --pyargs mergify_engine --cov=mergify_engine --cov-config .coveragerc {posargs}
[testenv:record]
envdir={toxworkdir}/py38
setenv =
MERGIFYENGINE_RECORD=1
MERGIFYENGINE_TEST_SETTINGS=test.env
whitelist_externals =
git
commands =
{[testenv]commands}
git add zfixtures/cassettes/
[testenv:missing-imports]
extras =
commands =
python mergify_engine/worker.py
python mergify_engine/asgi.py
[testenv:test]
setenv =
PYTHONUNBUFFERED=1
MERGIFYENGINE_TEST_SETTINGS=test.env
commands =
pifpaf run -g MERGIFYENGINE_STORAGE_URL redis --port 6363 -- pifpaf run -g MERGIFYENGINE_STREAM_URL redis --port 6365 -- honcho -f Procfile-test start
[testenv:requirements]
recreate = true
skip_install = true
commands = pip check
[testenv:genreqs]
basepython = python3.8
recreate = true
skip_install = true
deps =
-c requirements.txt
.
commands_pre =
commands =
pip uninstall --yes mergify-engine
bash -c "pip freeze --exclude-editable >| requirements.txt"
bash -c "echo '-e .' >> requirements.txt"
whitelist_externals =
bash
[testenv:venv]
deps = .
commands = bash -c "{posargs}"
whitelist_externals = bash
[testenv:black]
commands_pre =
skip_install = true
deps =
black
isort
commands =
isort .
black .
[testenv:pep8]
skip_install = true
deps = flake8
flake8-black
flake8-blind-except
flake8-builtins
flake8-docstrings
flake8-rst-docstrings
flake8-logging-format
isort
mypy
commands =
flake8
isort -c .
mypy
[testenv:docs]
extras = docs
whitelist_externals =
rm
bash
commands =
rm -rf docs/build
bash -c "git ls-files docs/*.rst | while read file; do if ! grep -q :description: $file; then echo E: no description meta tag in $file; exit 1; fi; done"
sphinx-build -W -b html docs/source docs/build
[flake8]
exclude = .tox,.eggs,docs
show-source = true
select = C,E,F,W,B,B950
# E101,W191: Can't ignore tabs indent on multiline strings:
# https://gitlab.com/pycqa/flake8/issues/375
# E231 and E203 are not respected by black
ignore = E501,W503,E203,G200,G201,E101,W191,E231
enable-extensions = G
[isort]
force_single_line = true
lines_after_imports = 2
force_sort_within_sections = true
known_first_party = mergify_engine
known_third_party = datadog
default_section = THIRDPARTY