31 lines
1.2 KiB
Bash
Executable File
31 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
rm -f coverage.xml
|
|
rm -f test_results.xml
|
|
|
|
test -d wcs || git clone http://git.entrouvert.org/wcs.git
|
|
(cd wcs && git pull)
|
|
|
|
export PIP_USE_WHEEL=no
|
|
(pip freeze | grep -q Quixote) || pip install quixote
|
|
(pip freeze | grep -q scgi) || pip install scgi
|
|
pip install --upgrade 'pip<8'
|
|
pip install --upgrade 'pylint<1.8' pylint-django
|
|
pip install --upgrade -r requirements.txt
|
|
pip install --upgrade pytest pytest-django pytest-cov WebTest django-webtest 'setuptools<34'
|
|
pip install --upgrade 'django>=1.8, <1.9'
|
|
pip install --no-deps --upgrade 'git+http://repos.entrouvert.org/cmsplugin-blurp.git/#egg=django-cmsplugin-blurp' # use blurp from git/master for now
|
|
pip install --upgrade XStatic-ChartNew.js
|
|
pip install --upgrade mock
|
|
|
|
WCSCTL=$(pwd)/wcs/wcsctl.py \
|
|
DJANGO_SETTINGS_MODULE=combo.settings \
|
|
COMBO_SETTINGS_FILE=tests/settings.py \
|
|
py.test --junitxml=test_results.xml --cov-report xml --cov=combo/ --cov-config .coveragerc tests/
|
|
|
|
test -f pylint.out && cp pylint.out pylint.out.prev
|
|
(pylint -f parseable --rcfile /var/lib/jenkins/pylint.django.rc combo | tee pylint.out) || /bin/true
|
|
test -f pylint.out.prev && (diff pylint.out.prev pylint.out | grep '^[><]' | grep .py) || /bin/true
|