0001-ci-speed-up-CI-using-multiple-processes-with-pylint-.patch
Jenkinsfile | ||
---|---|---|
9 | 9 |
stages { |
10 | 10 |
stage('Unit Tests') { |
11 | 11 |
steps { |
12 |
sh 'tox -rv'
|
|
12 |
sh 'NUMPROCESSES=6 tox -rv '
|
|
13 | 13 |
} |
14 | 14 |
post { |
15 | 15 |
always { |
pylint.sh | ||
---|---|---|
1 | 1 |
#!/bin/bash |
2 | 2 |
set -e -x |
3 | 3 |
env |
4 | ||
5 |
pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0 |
|
4 |
pylint --jobs ${NUMPROCESSES:-1} -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0 |
tox.ini | ||
---|---|---|
10 | 10 |
BRANCH_NAME={env:BRANCH_NAME:} |
11 | 11 |
WCSCTL=wcs/wcsctl.py |
12 | 12 |
SETUPTOOLS_USE_DISTUTILS=stdlib |
13 |
NUMPROCESSES={env:NUMPROCESSES:1} |
|
13 | 14 |
fast: FAST=--nomigrations |
14 | 15 |
coverage: COVERAGE=--junitxml=junit-{envname}.xml --cov-report xml --cov-report html --cov=passerelle/ --cov-config .coveragerc -Wignore |
15 | 16 |
deps = |
... | ... | |
19 | 20 |
psycopg2-binary<2.9 |
20 | 21 |
pytest-cov |
21 | 22 |
pytest-django |
23 |
pytest-xdist |
|
22 | 24 |
pytest!=6.0.0 |
23 | 25 |
WebTest |
24 | 26 |
mock<4 |
... | ... | |
41 | 43 |
codestyle: pre-commit |
42 | 44 |
commands = |
43 | 45 |
./get_wcs.sh |
44 |
py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/} |
|
46 |
py.test {posargs: --numprocesses {env:NUMPROCESSES:1} --dist loadfile {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
|
|
45 | 47 |
codestyle: pre-commit run --all-files --show-diff-on-failure |
46 | 48 | |
47 | 49 |
[pytest] |
... | ... | |
60 | 62 |
PASSERELLE_SETTINGS_FILE=tests/settings.py |
61 | 63 |
BRANCH_NAME={env:BRANCH_NAME:} |
62 | 64 |
SETUPTOOLS_USE_DISTUTILS=stdlib |
65 |
NUMPROCESSES={env:NUMPROCESSES:6} |
|
63 | 66 |
deps = |
64 | 67 |
pytest-django |
65 | 68 |
pytest!=6.0.0 |
66 |
- |