Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Start using postgres in travis config

Krzysztof Wolski13792318d7fe
diff --git a/.travis.yml b/.travis.yml
index 643a92e140..792d081edd 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,7 @@ script:
env:
global:
- DJANGO_SETTINGS_MODULE=tests.settings
+ - DATABASE_URL='postgres://postgres@localhost:5432/saleor'
matrix:
- TOXENV=py27-django18
- TOXENV=py27-django110
@@ -40,3 +41,5 @@ addons:
packages:
- python3.5
- python3.5-dev
+services:
+ - postgresql
diff --git a/tests/settings.py b/tests/settings.py
index 53659090e9..c80bc17fb1 100644
--- a/tests/settings.py
+++ b/tests/settings.py
@@ -5,7 +5,8 @@ SECRET_KEY = 'NOTREALLY'
DEFAULT_CURRENCY = 'USD'
-DATABASES['default']['TEST'] = { # noqa
- 'SERIALIZE': False,
- 'NAME': ':memory:',
- 'MIRROR': None}
+if 'sqlite' in DATABASES['default']['ENGINE']:
+ DATABASES['default']['TEST'] = { # noqa
+ 'SERIALIZE': False,
+ 'NAME': ':memory:',
+ 'MIRROR': None}
diff --git a/tox.ini b/tox.ini
index c37159373f..b2da088661 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,7 +3,7 @@ envlist = py{27,34,35}-django{18,110,_master}
skipsdist = True
[testenv]
-passenv = DJANGO_SETTINGS_MODULE
+passenv = DJANGO_SETTINGS_MODULE DATABASE_URL
deps =
-rrequirements.txt
pytest-cov