Skip to content

Commit

Permalink
fix postgres on travis
Browse files Browse the repository at this point in the history
  • Loading branch information
saulshanabrook committed Nov 8, 2015
1 parent a4c0803 commit c2c149a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -8,6 +8,8 @@ python:
- "3.5"
services:
- redis-server
before_script:
- psql -c "CREATE DATABASE mydb;" -U postgres
install:
- pip install -e . -r requirements-testing.txt $DJANGO_VERSION
script:
Expand All @@ -17,6 +19,7 @@ after_success:
env:
global:
- DB_HOST=localhost
- DB_NAME=mydb
- REDIS_HOST=localhost
matrix:
- DJANGO_VERSION="django>=1.8,<1.9"
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Expand Up @@ -8,6 +8,7 @@ tests:
- redis
environment:
DB_HOST: db
DB_NAME: postgres
REDIS_HOST: redis
db:
image: postgres
Expand Down
2 changes: 1 addition & 1 deletion tests/settings.py
Expand Up @@ -11,7 +11,7 @@
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'NAME': os.environ['DB_NAME'],
'USER': 'postgres',
'HOST': os.environ['DB_HOST'],
'PORT': 5432,
Expand Down

0 comments on commit c2c149a

Please sign in to comment.