Browse Source

Adding Travis CI to Misago

Ralfp 12 years ago
parent
commit
149844863f
3 changed files with 29 additions and 1 deletions
  1. 7 0
      .travis.yml
  2. 10 1
      deployment/settings.py
  3. 12 0
      requirements.txt

+ 7 - 0
.travis.yml

@@ -0,0 +1,7 @@
+language: python
+python:
+  - "2.7"
+# command to install dependencies
+install: "pip install -r requirements.txt --use-mirrors"
+# command to run tests
+script: python manage.py test

+ 10 - 1
deployment/settings.py

@@ -29,11 +29,20 @@ DATABASES = {
     }
     }
 }
 }
 
 
+# Override DB if we are in tests
+if 'test' in sys.argv:
+    DATABASES['default'] = {'ENGINE': 'django.db.backends.sqlite3'}
+    SKIP_SOUTH_TESTS = True
+
 # Cache engine
 # Cache engine
 # Misago is EXTREMELY data hungry
 # Misago is EXTREMELY data hungry
 # If you don't set any cache, it will BRUTALISE your database and memory
 # If you don't set any cache, it will BRUTALISE your database and memory
 # In production ALWAYS use cache
 # In production ALWAYS use cache
-CACHES = {}
+CACHES = {
+    'default': {
+        'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
+   }
+}
 
 
 # Cookies configuration
 # Cookies configuration
 COOKIES_DOMAIN = '' # For example cookie domain for "www.mysite.com" or "forum.mysite.com" is ".mysite.com"
 COOKIES_DOMAIN = '' # For example cookie domain for "www.mysite.com" or "forum.mysite.com" is ".mysite.com"

+ 12 - 0
requirements.txt

@@ -0,0 +1,12 @@
+django
+django-debug-toolbar
+django-mptt
+coffin
+jinja2
+markdown
+path.py
+Pillow
+pytz
+recaptcha-client
+South
+Unidecode