This automatically runs the tests (except the browser ones) via tox.
Tested on my github account. This will require some setup on the GitHub
end: Travis will need to be turned on for the project, and ideally a
badge added to the readme so we can see the build status.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
--- /dev/null
+language: python
+python: 3.5
+
+services:
+ - mysql
+
+env:
+ global:
+ - PW_TEST_DB_USER=travis
+ - PW_TEST_DB_PASS=""
+ - PW_SKIP_BROWSER_TESTS=yes
+ matrix:
+ - TOX_ENV=py27-django16
+ - TOX_ENV=py27-django17
+ - TOX_ENV=py27-django18
+ - TOX_ENV=py27-django19
+ - TOX_ENV=py34-django16
+ - TOX_ENV=py34-django17
+ - TOX_ENV=py34-django18
+ - TOX_ENV=py34-django19
+ - TOX_ENV=py35-django18
+ - TOX_ENV=py35-django19
+
+before_script:
+ - mysql -e 'create database patchwork character set utf8;'
+
+install:
+ - pip install tox
+
+script:
+ - tox -e $TOX_ENV