ensure tox.ini compatibility with Jenkinsfile
This commit is contained in:
parent
2646ab4ee7
commit
5b2fa9d6d0
|
@ -0,0 +1,2 @@
|
|||
[run]
|
||||
omit = */south_migrations/*
|
|
@ -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
|
21
tox.ini
21
tox.ini
|
@ -1,24 +1,20 @@
|
|||
[tox]
|
||||
envlist = py2-coverage-pylint
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/passerelle-atreal-openads/{env:BRANCH_NAME:}
|
||||
envlist = django111-pg
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
basepython = python2
|
||||
usedevelop =
|
||||
coverage: True
|
||||
nocoverage: False
|
||||
setenv =
|
||||
DJANGO_SETTINGS_MODULE=passerelle.settings
|
||||
PASSERELLE_SETTINGS_FILE=tests/settings.py
|
||||
BRANCH_NAME={env:BRANCH_NAME:}
|
||||
fast: FAST=--nomigrations
|
||||
sqlite: DB_ENGINE=django.db.backends.sqlite3
|
||||
pg: DB_ENGINE=django.db.backends.postgresql_psycopg2
|
||||
coverage: COVERAGE=--junitxml=test_results.xml --cov-report xml --cov-report html --cov=atreal_openads/
|
||||
deps =
|
||||
django112: django>=1.11,<1.12
|
||||
http://git.entrouvert.org/passerelle.git/snapshot/passerelle-master.tar.gz
|
||||
psycopg2-binary
|
||||
pytest-cov
|
||||
pytest-django<3.4.6
|
||||
pytest
|
||||
pytest-django
|
||||
pytest>=3.3.0,<4
|
||||
WebTest
|
||||
mock
|
||||
httmock
|
||||
|
@ -26,4 +22,5 @@ deps =
|
|||
pylint-django<0.8.1
|
||||
django-webtest<1.9.3
|
||||
commands =
|
||||
django111: py.test {posargs: --junitxml=test_{envname}_results.xml tests/}
|
||||
py.test {env:COVERAGE:} {posargs:tests/}
|
||||
pylint: ./pylint.sh atreal_openads/
|
||||
|
|
Reference in New Issue