A webapp/form for people to join pEp coop. Fork of Cultural Commons Collecting Society (C3S) SCE
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

40 lines
1.4 KiB

#!/usr/bin/env sh
#
# continuous integration shell script to set up the project and run tests
set -euo pipefail
# apt-get install python-virtualenv
# sudo apt-get install libxml2-dev libxslt1-dev (needed for pyquery)
# create a virtualenv, preferrably with the python 2.7 variant:
virtualenv env
# update setuptools if neccessary
env/bin/pip install --upgrade pip
env/bin/pip install -U setuptools
# set it up
# this will take a little while and install all necessary dependencies.
env/bin/python setup.py develop
# delete the old database
rm c3sMembership.db
# populate the database
env/bin/initialize_c3sMembership_db development.ini
# prepare for tests
env/bin/pip install nose coverage pep8 pylint pyflakes pyquery
#
# test preparation
#
# we use selenium for user interface tests. so we need firefox and xvfb
# start Xvfband send it to the background: Xvfb :10 &
export DISPLAY=:10
# run the tests
env/bin/nosetests c3smembership/ --with-coverage --cover-html --with-xunit
# this is how you can run individial tests:
#env/bin/nosetests c3smembership/tests/test_webtest.py:FunctionalTests.test_faq_template
# for pyflakes
find c3smembership -regex '.*.py' ! -regex '.*tests.*'|egrep -v '^./tests/'|xargs env/bin/pyflakes > pyflakes.log || :
# for pylint
rm -f pylint.log
for f in `find c3smembership -regex '.*.py' ! -regex '.*tests.*'|egrep -v '^./tests/'`; do
env/bin/pylint --output-format=parseable --reports=y $f >> pylint.log
done || :