-
Notifications
You must be signed in to change notification settings - Fork 89
/
Copy pathtox.ini
194 lines (184 loc) · 4.33 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[tox]
envlist = flake,pylint,py312-coverage,py310-install
skipsdist = True
setenv = PIP_CONFIG_FILE=.pip.conf
allowlist_externals =
rm
bash
[testenv]
setenv =
coverage: SETUPTOOLS_ENABLE_FEATURES = legacy-editable
CCACHE_DIR = {envdir}/.ccache
COMPILE_WITH_TESTS = true
LC_ALL = C.UTF-8
LANG = C.UTF-8
SCHEMA_PATH={toxinidir}/doc/api_schema.yaml
POLEMARCH_EXECUTOR_PYTHON={envdir}/pmansible/bin/python
ANSIBLE_PYTHON_INTERPRETER={envdir}/pmansible/bin/python
TMPDIR={envdir}/tmp
COVERAGE_FILE={envdir}/.coverage
passenv =
DJANGO_LOG_LEVEL
CC
BUILD_COMPILE
allowlist_externals =
rm
ls
ln
bash
mkdir
{envdir}/pmansible/bin/python
commands =
rm -rf {envdir}/tmp
mkdir -p {envdir}/tmp
-pip install -U 'pip~=24.0'
python -m virtualenv -p python3.10 {envdir}/pmansible
{envdir}/pmansible/bin/python -m pip install -U 'polemarch-ansible~=3.0.1' 'ansible-core~=2.17.7'
install: -pip uninstall polemarch -y
install: rm -rfv {envdir}/dist/
install: pip wheel {toxinidir} -w {envdir}/dist/ --no-deps
install: bash -c "export BUILD_COMPILE=true; pip install -U {envdir}/dist/$(ls {envdir}/dist)[test]"
coverage: pip install -U -e .[test]
install: rm -f {envdir}/tests.py {envdir}/tests.pyc
install: rm -rf {envdir}/test_data
install: ln -s {toxinidir}/test_data {envdir}/test_data
install: ln -s {toxinidir}/tests.py {envdir}/tests.py
install: python -m polemarch test -v 2 --failfast
coverage: python -m polemarch makemigrations main --check
coverage: coverage debug sys
coverage: coverage erase
coverage: coverage run -m polemarch test -v 2 --failfast {posargs}
coverage: coverage combine
coverage: coverage report
rm -rf .eggs build polemarch.egg-info {envdir}/dist
deps =
-rrequirements.txt
-rrequirements-git.txt
-rrequirements-test.txt
virtualenv
[testenv:flake]
basepython = python3.10
deps =
flake8==6.0.0
flake8-bugbear==23.7.10
flake8-commas==2.1.0
flake8-comprehensions==3.14.0
flake8-django==1.3.0
flake8-executable==2.1.3
flake8-functions==0.0.8
flake8-import-order==0.18.2
Flake8-pyproject==1.2.3
commands =
flake8 polemarch
flake8 --ignore=CFQ001,C812 tests.py
[testenv:pylint]
basepython = python3.10
deps =
pylint==3.3.1
pylint-django==2.5.5
pylint-plugin-utils==0.8.2
-rrequirements.txt
-rrequirements-git.txt
commands =
pip uninstall polemarch -y
pip install -U -e .
pylint --rcfile=./.pylintrc {posargs} polemarch
[testenv:js_style]
changedir = ./
deps =
allowlist_externals = yarn
commands =
yarn install
yarn lint
[testenv:build]
basepython = python3.10
setenv =
LC_ALL = en_US.UTF-8
LANG = en_US.UTF-8
passenv = *
changedir = .
allowlist_externals =
tox
rm
deps = tox~=4.0
commands =
rm -rf dist build
tox -c tox_build.ini -e py310-build,py310-wheel --workdir {toxworkdir}
[testenv:builddoc]
basepython = python3.11
changedir = ./doc/
allowlist_externals =
make
setenv =
READTHEDOCS = true
commands =
make html
; make latexpdf
deps =
-rrequirements-rtd.txt
[testenv:build_for_docker]
basepython = python3.12
skipsdist = True
setenv =
CCACHE_DIR = {envdir}/.ccache
BUILD_OPTIMIZATION = true
BUILD_COMPILE = true
passenv = *
allowlist_externals = *
commands =
sphinx-build --builder html ./doc ./polemarch/doc/html
pip wheel .[mysql,postgresql,ansible-core,production] -w wheels
deps =
-rrequirements-doc.txt
polemarch-ansible~=3.0
vstcompile~=3.0
pip~=23.3.1
wheel
cython~=3.0.11
setuptools>=61.2
[testenv:release]
basepython = python3.10
toxworkdir = ./
passenv = *
setenv =
LC_ALL = en_US.UTF-8
LANG = en_US.UTF-8
allowlist_externals =
mkdir
ls
commands =
mkdir -p dist
ls -la dist
python setup.py githubrelease
deps =
githubrelease
[testenv:contrib]
basepython = python3.10
skipsdist = False
usedevelop = True
envdir = {toxinidir}/env
setenv =
CCACHE_DIR = {envdir}/.ccache
LC_ALL = en_US.UTF-8
LANG = en_US.UTF-8
passenv = *
allowlist_externals = *
commands =
pip install -U -e .[test]
deps =
cython>0.29,<0.30
tox~=4.0
pip~=23.0
[testenv:release-docker]
passenv = *
setenv =
LC_ALL = en_US.UTF-8
LANG = en_US.UTF-8
allowlist_externals =
/usr/bin/bash
docker
git
./autobuild.sh
commands = bash ./autobuild.sh
deps =
docker-compose~=1.29.2