132 lines
2.8 KiB
INI
132 lines
2.8 KiB
INI
[tox]
|
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/ants-hub/
|
|
envlist =
|
|
py3-dj32
|
|
code-style
|
|
check-migrations
|
|
pylint
|
|
|
|
[tox:jenkins]
|
|
envlist =
|
|
pylint
|
|
code-style
|
|
check-migrations
|
|
update-locales
|
|
py3-dj32
|
|
|
|
[testenv]
|
|
usedevelop=true
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=tests/settings.py
|
|
JUNIT={tty::-o junit_suite_name={envname} --junit-xml=junit-{envname}.xml}
|
|
COVERAGE={tty::--junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=src/ants_hub/ --cov-config .coveragerc}
|
|
deps =
|
|
dj32: django>=3.2,<3.3
|
|
-r test-requirements.txt
|
|
commands =
|
|
python setup.py compile_translations
|
|
py.test {posargs:{env:COVERAGE:} {env:JUNIT:} tests/}
|
|
|
|
[testenv:manage]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=fixtures/settings.py
|
|
deps =
|
|
django-debug-toolbar
|
|
ipython
|
|
ipdb
|
|
commands =
|
|
./manage.py {posargs:--help}
|
|
|
|
[testenv:update-locales]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=tests/settings.py
|
|
deps =
|
|
commands =
|
|
./manage.py makemessages -l fr -i tests
|
|
./manage.py compilemessages
|
|
|
|
[testenv:pylint]
|
|
basepython = python3
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=tests/settings.py
|
|
env_bin_dir = scripts
|
|
deps =
|
|
pylint<3
|
|
astroid<3
|
|
pylint-django
|
|
-r test-requirements.txt
|
|
allowlist_externals=
|
|
{toxinidir}/scripts/pylint.sh
|
|
commands =
|
|
{toxinidir}/scripts/pylint.sh src/ants_hub/ tests/
|
|
|
|
[testenv:code-style]
|
|
skip_install = true
|
|
deps =
|
|
pre-commit
|
|
commands =
|
|
pre-commit run --all-files --show-diff-on-failure
|
|
|
|
[testenv:check-migrations]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=fixtures/settings.py
|
|
allowlist_externals=
|
|
{toxinidir}/scripts/check-migrations.sh
|
|
commands =
|
|
{toxinidir}/scripts/check-migrations.sh
|
|
|
|
[testenv:runserver]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=fixtures/settings.py
|
|
deps =
|
|
django-debug-toolbar
|
|
commands =
|
|
./manage.py migrate
|
|
./manage.py loaddata fixtures/admin.json
|
|
./manage.py loaddata fixtures/example1.json
|
|
./manage.py runserver {posargs:9000}
|
|
|
|
[testenv:runuwsgi]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=scripts/runuwsgi_settings.py
|
|
deps =
|
|
allowlist_externals=
|
|
bash
|
|
commands =
|
|
bash scripts/uwsgi.sh
|
|
|
|
[testenv:bench]
|
|
usedevelop = True
|
|
setenv =
|
|
DJANGO_SETTINGS_MODULE=ants_hub.settings
|
|
ANTS_HUB_SETTINGS_FILE=scripts/runuwsgi_settings.py
|
|
deps =
|
|
aiohttp
|
|
allowlist_externals=
|
|
bash
|
|
commands =
|
|
bash scripts/bench.sh
|
|
|
|
[pytest]
|
|
filterwarnings = error
|
|
|
|
[coverage:run]
|
|
branch = True
|
|
dynamic_context = test_function
|
|
|
|
[coverage:html]
|
|
show_contexts = True
|