20 lines
744 B
Bash
Executable File
20 lines
744 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
rm -f coverage.xml
|
|
rm -f test_results.xml
|
|
|
|
export PIP_USE_WHEEL=no
|
|
pip install --upgrade 'pip<8'
|
|
pip install --upgrade pylint pylint-django
|
|
pip install --upgrade pytest pytest-django pytest-cov WebTest django-webtest
|
|
pip install --upgrade -r requirements.txt
|
|
|
|
PYTHONPATH=$(pwd):$PYTHONPATH DJANGO_SETTINGS_MODULE=chrono.settings CHRONO_SETTINGS_FILE=tests/settings.py \
|
|
py.test --junitxml=test_results.xml --cov-report xml --cov=chrono/ --cov-config .coveragerc tests/
|
|
|
|
test -f pylint.out && cp pylint.out pylint.out.prev
|
|
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc chrono | tee pylint.out) || /bin/true
|
|
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true
|