[tox] toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/petale/ envlist = py3-dj22 py3-dj32 code-style check-migrations [tox:jenkins] envlist = pylint code-style check-migrations py3-dj22 [testenv] usedevelop=true setenv = DJANGO_SETTINGS_MODULE=petale.settings PETALE_SETTINGS_FILE=tests/settings.py SETUPTOOLS_USE_DISTUTILS=stdlib 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 deps = dj22: django>=2.2,<2.3 dj32: django>=3.2,<3.3 pytest-cov pytest-django pytest mock<4 django-webtest psycopg2-binary pyquery commands = python setup.py compile_translations py.test {env:COVERAGE:} {env:JUNIT:} {tty:--sw:} {posargs:tests/} [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} [testenv:pylint] basepython = python3 setenv = DJANGO_SETTINGS_MODULE=petale.settings PETALE_SETTINGS_FILE=tests/settings.py SETUPTOOLS_USE_DISTUTILS=stdlib deps = Django<2.3 psycopg2-binary pylint<3 astroid<3 pylint-django commands = /bin/bash -c "./pylint.sh petale/" [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=petale.settings PETALE_SETTINGS_FILE=tests/settings.py SETUPTOOLS_USE_DISTUTILS=stdlib deps = psycopg2-binary commands = ./check-migrations.sh [pytest] junit_family=xunit2 filterwarnings = error ignore:Using or importing the ABCs from 'collections':DeprecationWarning:django.* # 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 ignore::ImportWarning