2017-02-20 19:09:01 +01:00
|
|
|
[tox]
|
|
|
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/petale/
|
2020-05-16 12:12:39 +02:00
|
|
|
envlist =
|
2023-01-10 18:32:30 +01:00
|
|
|
py3-dj22
|
|
|
|
py3-dj32
|
2022-03-10 17:01:10 +01:00
|
|
|
code-style
|
2022-03-17 18:52:38 +01:00
|
|
|
check-migrations
|
2020-05-16 12:12:39 +02:00
|
|
|
|
|
|
|
[tox:jenkins]
|
|
|
|
envlist =
|
|
|
|
pylint
|
2022-03-10 17:01:10 +01:00
|
|
|
code-style
|
2022-03-17 18:52:38 +01:00
|
|
|
check-migrations
|
2023-01-10 18:32:30 +01:00
|
|
|
py3-dj22
|
2017-02-20 19:09:01 +01:00
|
|
|
|
|
|
|
[testenv]
|
2020-05-16 12:12:39 +02:00
|
|
|
usedevelop=true
|
2017-02-20 19:09:01 +01:00
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=petale.settings
|
|
|
|
PETALE_SETTINGS_FILE=tests/settings.py
|
2020-09-01 14:38:06 +02:00
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2020-05-16 12:12:39 +02:00
|
|
|
|
|
|
|
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=petale/ --cov-config .coveragerc}
|
|
|
|
passenv=
|
|
|
|
BRANCH_NAME
|
|
|
|
# support for pg_virtualenv
|
|
|
|
PGPORT
|
|
|
|
PGHOST
|
|
|
|
PGUSER
|
|
|
|
PGPASSWORD
|
2017-02-20 19:09:01 +01:00
|
|
|
deps =
|
2020-04-06 11:03:47 +02:00
|
|
|
dj22: django>=2.2,<2.3
|
2023-01-10 18:32:30 +01:00
|
|
|
dj32: django>=3.2,<3.3
|
2017-02-20 19:09:01 +01:00
|
|
|
pytest-cov
|
2020-04-06 11:03:47 +02:00
|
|
|
pytest-django
|
2017-02-20 19:09:01 +01:00
|
|
|
pytest
|
2020-10-06 09:30:25 +02:00
|
|
|
mock<4
|
2022-04-29 11:30:09 +02:00
|
|
|
django-webtest
|
2023-09-20 11:07:55 +02:00
|
|
|
psycopg2-binary
|
2018-03-30 12:00:31 +02:00
|
|
|
pyquery
|
2017-02-20 19:09:01 +01:00
|
|
|
commands =
|
2019-10-01 12:05:11 +02:00
|
|
|
python setup.py compile_translations
|
2020-05-16 12:12:39 +02:00
|
|
|
py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/}
|
2020-04-06 11:03:47 +02:00
|
|
|
|
2022-03-10 16:54:54 +01:00
|
|
|
[testenv:manage]
|
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=petale.settings
|
|
|
|
PETALE_SETTINGS_FILE=tests/settings.py
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
|
|
|
|
|
|
|
deps =
|
|
|
|
psycopg2-binary
|
|
|
|
django-debug-toolbar
|
|
|
|
ipython
|
|
|
|
ipdb
|
|
|
|
commands =
|
|
|
|
./manage.py {posargs:--help}
|
|
|
|
|
2020-04-06 11:03:47 +02:00
|
|
|
[testenv:pylint]
|
2021-12-15 08:27:17 +01:00
|
|
|
basepython = python3
|
2022-03-10 17:11:53 +01:00
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=petale.settings
|
|
|
|
PETALE_SETTINGS_FILE=tests/settings.py
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
2020-04-06 11:03:47 +02:00
|
|
|
deps =
|
2020-05-16 12:12:39 +02:00
|
|
|
Django<2.3
|
2022-03-10 17:11:53 +01:00
|
|
|
psycopg2-binary
|
2023-10-03 06:17:38 +02:00
|
|
|
pylint<3
|
|
|
|
astroid<3
|
2022-03-10 17:11:53 +01:00
|
|
|
pylint-django
|
2020-04-06 11:03:47 +02:00
|
|
|
commands =
|
2020-05-16 12:12:39 +02:00
|
|
|
/bin/bash -c "./pylint.sh petale/"
|
2020-04-06 11:03:47 +02:00
|
|
|
|
2022-03-10 17:01:10 +01:00
|
|
|
[testenv:code-style]
|
|
|
|
skip_install = true
|
|
|
|
deps =
|
|
|
|
pre-commit
|
|
|
|
commands =
|
|
|
|
pre-commit run --all-files --show-diff-on-failure
|
|
|
|
|
2022-03-17 18:52:38 +01:00
|
|
|
[testenv:check-migrations]
|
|
|
|
basepython = python3
|
|
|
|
usedevelop = True
|
|
|
|
setenv =
|
|
|
|
DJANGO_SETTINGS_MODULE=petale.settings
|
|
|
|
PETALE_SETTINGS_FILE=tests/settings.py
|
|
|
|
SETUPTOOLS_USE_DISTUTILS=stdlib
|
|
|
|
deps =
|
|
|
|
psycopg2-binary
|
|
|
|
commands =
|
|
|
|
./check-migrations.sh
|
|
|
|
|
2020-04-06 11:03:47 +02:00
|
|
|
[pytest]
|
|
|
|
junit_family=xunit2
|
2020-05-16 12:12:39 +02:00
|
|
|
filterwarnings =
|
|
|
|
error
|
|
|
|
ignore:Using or importing the ABCs from 'collections':DeprecationWarning:django.*
|
2020-11-27 15:35:43 +01:00
|
|
|
# warning of gettext() when using Django 1.11 with Python 3.8
|
|
|
|
ignore:set_output_charset\(\) is deprecated::django.utils.translation.trans_real
|
|
|
|
ignore:parameter codeset is deprecated::django.utils.translation.trans_real
|
2022-04-29 11:29:52 +02:00
|
|
|
ignore::ImportWarning
|