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'