run pylint inside tox
This commit is contained in:
parent
37173fb80e
commit
5461298c66
|
@ -6,8 +6,4 @@ rm -f coverage.xml
|
||||||
rm -f test_results.xml
|
rm -f test_results.xml
|
||||||
|
|
||||||
pip install --upgrade tox
|
pip install --upgrade tox
|
||||||
pip install --upgrade pylint pylint-django
|
|
||||||
tox -r
|
tox -r
|
||||||
test -f pylint.out && cp pylint.out pylint.out.prev
|
|
||||||
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc passerelle/ | tee pylint.out) || /bin/true
|
|
||||||
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true
|
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e -x
|
||||||
|
env
|
||||||
|
if [ -f /var/lib/jenkins/pylint.django.rc ]; then
|
||||||
|
PYLINT_RC=/var/lib/jenkins/pylint.django.rc
|
||||||
|
elif [ -f pylint.django.rc ]; then
|
||||||
|
PYLINT_RC=pylint.django.rc
|
||||||
|
else
|
||||||
|
echo No pylint RC found
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -f pylint.out && cp pylint.out pylint.out.prev
|
||||||
|
pylint -f parseable --rcfile ${PYLINT_RC} "$@" | tee pylint.out || /bin/true
|
||||||
|
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true¶
|
7
tox.ini
7
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = coverage-{django17,django18}
|
envlist = coverage-django17-pylint,coverage-django18
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle/
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -19,9 +19,10 @@ deps =
|
||||||
WebTest
|
WebTest
|
||||||
mock
|
mock
|
||||||
httmock
|
httmock
|
||||||
pylint==1.4.0
|
|
||||||
astroid==1.3.2
|
|
||||||
python-dateutil
|
python-dateutil
|
||||||
|
pylint
|
||||||
|
pylint-django
|
||||||
commands =
|
commands =
|
||||||
./getmagic.sh
|
./getmagic.sh
|
||||||
py.test {env:COVERAGE:} {posargs:tests/}
|
py.test {env:COVERAGE:} {posargs:tests/}
|
||||||
|
pylint: ./pylint.sh passerelle/
|
||||||
|
|
Loading…
Reference in New Issue