build: make it fail in case of pylint warnings (#62099)

This commit is contained in:
Lauréline Guérin 2022-03-17 14:58:14 +01:00
parent dbb8416537
commit 1d9722a210
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
2 changed files with 23 additions and 5 deletions

View File

@ -2,4 +2,4 @@
set -e -x
env
pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out || /bin/true
pylint -f parseable --rcfile pylint.rc "$@" | tee pylint.out; test $PIPESTATUS -eq 0

26
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/{env:BRANCH_NAME:}
envlist = py3-django22-xmlschema14-codestyle-coverage,py3-django22-xmlschema10
envlist = py3-django22-xmlschema14-codestyle-coverage,py3-django22-xmlschema10,pylint
[testenv]
usedevelop = True
@ -24,8 +24,6 @@ deps =
mock<4
httmock
python-dateutil
pylint
pylint-django
django-webtest<1.9.3
lxml
mohawk
@ -45,7 +43,6 @@ deps =
commands =
./get_wcs.sh
py.test {posargs: {env:FAST:} {env:COVERAGE:} {env:JUNIT:} tests/}
coverage: ./pylint.sh passerelle/
codestyle: pre-commit run --all-files --show-diff-on-failure
[pytest]
@ -57,3 +54,24 @@ filterwarnings = default
module:.*init.*authority.*code.*syntax is deprecated:DeprecationWarning:pyproj
# wcs root directory must be renamed to fix this one
ignore:Not importing directory.*/wcs':ImportWarning
[testenv:pylint]
setenv =
DJANGO_SETTINGS_MODULE=passerelle.settings
PASSERELLE_SETTINGS_FILE=tests/settings.py
BRANCH_NAME={env:BRANCH_NAME:}
SETUPTOOLS_USE_DISTUTILS=stdlib
deps =
pytest-django
pytest!=6.0.0
WebTest
mock<4
httmock
pylint
pylint-django
django-webtest<1.9.3
pytest-freezegun
responses
mohawk
commands =
./pylint.sh passerelle/ tests/