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.

ci.sh 1.4KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env sh
  2. #
  3. # continuous integration shell script to set up the project and run tests
  4. set -euo pipefail
  5. # apt-get install python-virtualenv
  6. # sudo apt-get install libxml2-dev libxslt1-dev (needed for pyquery)
  7. # create a virtualenv, preferrably with the python 2.7 variant:
  8. virtualenv env
  9. # update setuptools if neccessary
  10. env/bin/pip install --upgrade pip
  11. env/bin/pip install -U setuptools
  12. # set it up
  13. # this will take a little while and install all necessary dependencies.
  14. env/bin/python setup.py develop
  15. # delete the old database
  16. rm c3sMembership.db
  17. # populate the database
  18. env/bin/initialize_c3sMembership_db development.ini
  19. # prepare for tests
  20. env/bin/pip install nose coverage pep8 pylint pyflakes pyquery
  21. #
  22. # test preparation
  23. #
  24. # we use selenium for user interface tests. so we need firefox and xvfb
  25. # start Xvfband send it to the background: Xvfb :10 &
  26. export DISPLAY=:10
  27. # run the tests
  28. env/bin/nosetests c3smembership/ --with-coverage --cover-html --with-xunit
  29. # this is how you can run individial tests:
  30. #env/bin/nosetests c3smembership/tests/test_webtest.py:FunctionalTests.test_faq_template
  31. # for pyflakes
  32. find c3smembership -regex '.*.py' ! -regex '.*tests.*'|egrep -v '^./tests/'|xargs env/bin/pyflakes > pyflakes.log || :
  33. # for pylint
  34. rm -f pylint.log
  35. for f in `find c3smembership -regex '.*.py' ! -regex '.*tests.*'|egrep -v '^./tests/'`; do
  36. env/bin/pylint --output-format=parseable --reports=y $f >> pylint.log
  37. done || :