Added parallel migration executor to tox and travis

This commit is contained in:
Mateu Cànaves 2017-03-10 16:09:59 +01:00
parent 323cfcd38a
commit c5c1f06d71
2 changed files with 26 additions and 15 deletions

View File

@ -1,21 +1,22 @@
sudo: false
language: python
python:
- 2.7
- 3.5
- 2.7
- 3.5
services:
- postgresql
- 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/./}
install: pip install -q tox-travis
env:
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=1.10
- DJANGO=1.8
- DJANGO=1.9
- DJANGO=1.10
matrix:
fast_finish: true
script: tox
before_script: psql -c "CREATE DATABASE dts_test_project;" -U postgres
deploy:
provider: pypi
user: bcarneiro

16
tox.ini
View File

@ -1,10 +1,16 @@
[tox]
envlist = py{27,35}-dj{18,19,110}
envlist = py{27,35}-dj{18,19,110}-{standard,parallel}
[travis:env]
DJANGO =
1.8: dj18-{standard,parallel}
1.9: dj19-{standard,parallel}
1.10: dj110-{standard,parallel}
[testenv]
usedevelop = True
deps =
deps =
coverage
mock
tblib
@ -16,6 +22,10 @@ changedir = dts_test_project
passenv = PG_NAME PG_USER PG_PASSWORD PG_HOST PG_PORT
commands =
setenv =
standard: MIGRATION_EXECUTOR=standard
parallel: MIGRATION_EXECUTOR=parallel
commands =
coverage run manage.py test --noinput {posargs:tenant_schemas}
coverage report -m --include=../tenant_schemas/*