tox.ini: run in pg_virtualenv (#75513)

This commit is contained in:
Benjamin Dauvergne 2023-04-22 14:58:39 +02:00
parent 058a1378ff
commit 2ce0efa30a
2 changed files with 7 additions and 1 deletions

View File

@ -4,3 +4,8 @@ BIJOE_INIT_SQL = [
]
PAGE_LENGTH = 0
SELECT2_CACHE_PREFIX = 'select2_'
if 'postgres' in DATABASES['default']['ENGINE']:
for key in ('PGPORT', 'PGHOST', 'PGUSER', 'PGPASSWORD'):
if key in os.environ:
DATABASES['default'][key[2:]] = os.environ[key]

View File

@ -44,9 +44,10 @@ deps =
django32: Django-Select2>7.7,<7.8
django32: djangorestframework>=3.7
django32: https://git.entrouvert.org/entrouvert/hobo/archive/main.tar.gz
allowlist_externals = pg_virtualenv
commands =
python setup.py compile_translations
py3-django32: py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --cov-config=tox.ini --numprocesses {env:NUMPROCESSES:1} tests/}
pg_virtualenv -owal_level=minimal -omax_wal_senders=0 -owal_log_hints=off -ocheckpoint_timeout=1d -osynchronous_commit=off -ofull_page_writes=off -ofsync=off py.test {posargs: --junitxml=test_{envname}_results.xml --cov-report xml --cov-report html --cov=bijoe --cov-config=tox.ini --numprocesses {env:NUMPROCESSES:1} tests/}
[pytest]
filterwarnings =