Skip to content

Commit

Permalink
Configure travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatan treijs committed Feb 9, 2018
1 parent 4bbb85b commit a6cb364
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .travis.yml
@@ -1,3 +1,22 @@
language: python
before_install: cd kamaji-api

python:
- 2.6
- 2.7

services: postgresql

before_install:
- export DJANGO_SETTINGS_MODULE=api.settings.travis
- export PYTHONPATH=$HOME/builds/fredkj/kamaji
- export PIP_USE_MIRRORS=true

install:
- pip install -r requirements.txt
- pip install psycopg2 --quiet

before_script:
- psql -c "CREATE DATABASE mydb;" -U postgres

script:
- python manage.py migrate --noinput
18 changes: 18 additions & 0 deletions kamaji-api/kamajiapi/api/settings/travis.py
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
import logging

from .base import *


logging.basicConfig(level=logging.INFO)

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'travisci',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}

0 comments on commit a6cb364

Please sign in to comment.