diff --git a/Jenkinsfile b/Jenkinsfile index 68453baf..0d26e62c 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ pipeline { stages { stage('Unit Tests') { steps { - sh 'tox -rv' + sh 'NUMPROCESSES=6 tox -rv' } post { always { diff --git a/pylint.sh b/pylint.sh index ba7a6c3a..b20598c1 100755 --- a/pylint.sh +++ b/pylint.sh @@ -2,4 +2,4 @@ set -e -x env -pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0 +pylint --jobs ${NUMPROCESSES:-1} -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0 \ No newline at end of file diff --git a/tox.ini b/tox.ini index 93719398..8574c326 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ setenv = COMBO_SETTINGS_FILE=tests/settings.py TOX_WORK_DIR={toxworkdir} SETUPTOOLS_USE_DISTUTILS=stdlib + NUMPROCESSES={env:NUMPROCESSES:1} coverage: COVERAGE=--cov-report xml --cov-report html --cov=combo/ --cov-config .coveragerc -v DB_ENGINE=django.db.backends.postgresql_psycopg2 passenv = @@ -19,6 +20,7 @@ deps = pytest-cov pytest-django pytest-freezegun + pytest-xdist pytest!=5.3.3 WebTest mock<4 @@ -38,7 +40,7 @@ deps = commands = ./getlasso3.sh python manage.py compilemessages - py.test {env:COVERAGE:} {posargs: --junitxml=junit-{envname}.xml tests/} + py.test {env:COVERAGE:} {posargs: --numprocesses {env:NUMPROCESSES:1} --junitxml=junit-{envname}.xml tests/} codestyle: pre-commit run --all-files --show-diff-on-failure [testenv:pylint] @@ -48,6 +50,7 @@ setenv = TOX_WORK_DIR={toxworkdir} SETUPTOOLS_USE_DISTUTILS=stdlib DB_ENGINE=django.db.backends.postgresql_psycopg2 + NUMPROCESSES={env:NUMPROCESSES:1} deps = pytest-django pytest-freezegun