[PATCH 7/7] Add .travis.yml file

Daniel Axtens dja at axtens.net
Tue Aug 2 10:24:46 AEST 2016


This automatically runs the tests (except the browser ones) via tox.
Only the default tests are run: py{27,35} and django {1.8,1.9}.

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 at axtens.net>
---
 .travis.yml | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000000..244ba15f6c7b
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,25 @@
+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-django18
+    - TOX_ENV=py27-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
-- 
2.7.4



More information about the Patchwork mailing list