jenkins: run tests using postgres (#39583)
This commit is contained in:
parent
a9cedd9018
commit
769f77c4c8
|
@ -1,6 +1,15 @@
|
|||
import os
|
||||
|
||||
TIME_ZONE = 'Europe/Paris'
|
||||
LANGUAGE_CODE = 'en-us'
|
||||
|
||||
REST_FRAMEWORK = {
|
||||
'DEFAULT_AUTHENTICATION_CLASSES': ['rest_framework.authentication.BasicAuthentication'],
|
||||
}
|
||||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': os.environ.get('DB_ENGINE', 'django.db.backends.sqlite3'),
|
||||
'TEST': {'NAME': 'chrono-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:63],},
|
||||
}
|
||||
}
|
||||
|
|
5
tox.ini
5
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py3-django111-coverage-pylint, py3-django22
|
||||
envlist = py3-django111-pg-coverage-pylint, py3-django22-pg
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/chrono/{env:BRANCH_NAME:}
|
||||
|
||||
[testenv]
|
||||
|
@ -9,7 +9,9 @@ usedevelop =
|
|||
setenv =
|
||||
DJANGO_SETTINGS_MODULE=chrono.settings
|
||||
CHRONO_SETTINGS_FILE=tests/settings.py
|
||||
BRANCH_NAME={env:BRANCH_NAME:}
|
||||
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=chrono/
|
||||
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
|
||||
deps =
|
||||
pytest-cov
|
||||
pytest-django
|
||||
|
@ -27,6 +29,7 @@ deps =
|
|||
pytest-freezegun
|
||||
django111: django>=1.11,<1.12
|
||||
django22: django>=2.2,<2.3
|
||||
psycopg2-binary
|
||||
commands =
|
||||
./getlasso3.sh
|
||||
py.test {env:COVERAGE:} {posargs:tests/}
|
||||
|
|
Loading…
Reference in New Issue