From 0b35cb7201f28900399417da93e0d007823d5165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Thu, 13 Aug 2015 22:06:54 +0300 Subject: [PATCH] Let's try Travis with MySQL and SQLite too --- .travis.yml | 4 ++++ hc/settings.py | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/.travis.yml b/.travis.yml index 425eb273..15241ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,10 @@ python: install: - pip install -r requirements.txt - pip install coveralls +env: + - DB=sqlite + - DB=mysql + - DB=postgres addons: postgresql: "9.4" script: diff --git a/hc/settings.py b/hc/settings.py index d24740e3..d22a5a67 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -78,6 +78,24 @@ DATABASES = { } } +if os.environ.get("DB") == "mysql": + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.mysql', + 'USER': 'root', + 'NAME': 'hc', + 'TEST': {'CHARSET': 'UTF8'} + } + } + +if os.environ.get("DB") == "sqlite": + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': './hc.sqlite', + } + } + LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC'