Skip to content

Commit

Permalink
Merge pull request #404 from goodtune/travis-ci
Browse files Browse the repository at this point in the history
Add travis-ci.org integration
  • Loading branch information
goodtune committed Nov 10, 2016
2 parents 55d51b2 + ca7536b commit 9b79674
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: python

python:
- 2.7
- 3.5

services:
- postgresql

addons:
postgresql: "9.4"

install:
- pip install tox

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

script:
- tox -e py${TRAVIS_PYTHON_VERSION/./}-dj${DJANGO/./}

env:
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=1.10
4 changes: 2 additions & 2 deletions dts_test_project/dts_test_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@
DATABASES = {
'default': {
'ENGINE': 'tenant_schemas.postgresql_backend',
'NAME': 'dts_test_project',
'NAME': os.environ.get('PG_NAME', 'dts_test_project'),
'USER': os.environ.get('PG_USER', 'postgres'),
'PASSWORD': os.environ.get('PG_PASSWORD', 'root'),
'HOST': '127.0.0.1',
'HOST': os.environ.get('PG_HOST', 'localhost'),
}
}

Expand Down
5 changes: 1 addition & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
envlist = py{27,35}-dj{18,19,110}

[testenv]
basepython =
py27: python2.7
py35: python3.5
usedevelop = True

deps =
Expand All @@ -15,7 +12,7 @@ deps =

changedir = dts_test_project

passenv = PG_USER PG_PASSWORD
passenv = PG_NAME PG_USER PG_PASSWORD PG_HOST

commands =
coverage run manage.py test --noinput {posargs:tenant_schemas.tests -v 2}
Expand Down

0 comments on commit 9b79674

Please sign in to comment.