Allow running tox environments in parallel

This commit is contained in:
Alieh Rymašeŭski 2022-06-28 11:42:06 +00:00 committed by Hasan Ramezani
parent 5df31ea6b5
commit 309eef5d2a
2 changed files with 5 additions and 1 deletions

View file

@ -29,7 +29,9 @@ MIDDLEWARE = (
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
"NAME": os.getenv("TEST_DB_NAME", "auditlog_tests_db"),
"NAME": os.getenv(
"TEST_DB_NAME", "auditlog" + os.environ.get("TOX_PARALLEL_ENV", "")
),
"USER": os.getenv("TEST_DB_USER", "postgres"),
"PASSWORD": os.getenv("TEST_DB_PASS", ""),
"HOST": os.getenv("TEST_DB_HOST", "127.0.0.1"),

View file

@ -6,6 +6,8 @@ envlist =
py38-lint
[testenv]
setenv =
COVERAGE_FILE={toxworkdir}/.coverage.{envname}
commands =
coverage run --source auditlog runtests.py
coverage xml