Changeset - 6ccf86ebfd4e
[Not reviewed]
beta
0 2 1
Marcin Kuzminski - 13 years ago 2012-07-06 16:25:34
marcin@python-works.com
tox+travis with multiple dbs
3 files changed with 137 insertions and 8 deletions:
0 comments (0 inline, 0 general)
.travis.yml
Show inline comments
 
new file 100644
 
language: python
 
python:
 
  - "2.5"
 
  - "2.6"
 
  - "2.7"
 

	
 
env:  
 
  - TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 
  - TEST_DB=mysql://root@127.0.0.1/rhodecode_test
 
  - TEST_DB=postgresql://postgres@127.0.0.1/rhodecode_test
 

	
 
# command to install dependencies
 
before_script:
 
  - mysql -e 'create database rhodecode_test;'
 
  - psql -c 'create database rhodecode_test;' -U postgres
 

	
 
install:
 
  - pip install mysql-python psycopg2 mock unittest2
 
  - pip install . --use-mirrors
 
  - pip install -r requirements.txt --use-mirrors
 
# command to run tests
 
script: nosetests
 

	
 
notifications:
 
    email:
 
        - marcinkuz@gmail.com
 
    irc: "irc.freenode.org#rhodecode"
 

	
 
branches:
 
  only:
 
    - dev
test.ini
Show inline comments
 
@@ -209,9 +209,9 @@ logview.pylons.util = #eee
 
#########################################################
 
### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG    ###
 
#########################################################
 
sqlalchemy.db1.url = sqlite:///%(here)s/test.db
 
#sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_tests
 
#sqlalchemy.db1.url = mysql://root:qwe123qwe@localhost/rhodecode_tests
 
sqlalchemy.db1.url = sqlite:///%(here)s/rhodecode_test.sqlite
 
#sqlalchemy.db1.url = postgresql://postgres:qwe@localhost/rhodecode_test
 
#sqlalchemy.db1.url = mysql://root:qwe@localhost/rhodecode_test
 

	
 
sqlalchemy.db1.echo = false
 
sqlalchemy.db1.pool_recycle = 3600
tox.ini
Show inline comments
 
[tox]
 
envlist = py25,py26,py27
 
envlist = py25-sqlite,
 
          py25-mysql,
 
          py25-postgresql,
 
          py26-sqlite,
 
          py26-mysql,
 
          py26-postgresql,
 
          py27-sqlite,
 
          py27-mysql,
 
          py27-postgresql
 

	
 

	
 
#### PYTHON 2.5 ####                    
 
[testenv:py25-sqlite]
 
basepython =
 
    python2.5
 
commands =
 
    nosetests
 
setenv = 
 
    TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 

	
 
[testenv:py25]
 
[testenv:py25-mysql]
 
basepython =
 
    python2.5
 
commands =
 
    mysql -uroot -pqwe -e 'drop database if exists rhodecode_test;'
 
    mysql -uroot -pqwe -e 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    mysql-python
 
setenv = 
 
    TEST_DB=mysql://root:qwe@localhost/rhodecode_test
 

	
 
[testenv:py25-postgresql]
 
basepython =
 
    python2.5
 
commands =
 
    psql -Upostgres -Wqwe -hlocalhost -c 'drop database if exists rhodecode_test;'
 
    psql -Upostgres -Wqwe -hlocalhost -c 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    psycopg2    
 
setenv = 
 
    TEST_DB=postgresql://postgres:qwe@localhost/rhodecode_test
 

	
 

	
 
#### PYTHON 2.6 ####
 
[testenv:py26-sqlite]
 
basepython =
 
    python2.6
 
commands =
 
    nosetests
 
    
 
[testenv:py26]
 
setenv = 
 
    TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 

	
 
[testenv:py26-mysql]
 
basepython =
 
    python2.6
 
commands =
 
    mysql -uroot -pqwe -e 'drop database if exists rhodecode_test;'
 
    mysql -uroot -pqwe -e 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    mysql-python
 
setenv = 
 
    TEST_DB=mysql://root:qwe@localhost/rhodecode_test
 

	
 
[testenv:py26-postgresql]
 
basepython =
 
    python2.6
 
commands =
 
    psql -Upostgres -Wqwe -hlocalhost -c 'drop database if exists rhodecode_test;'
 
    psql -Upostgres -Wqwe -hlocalhost -c 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    psycopg2    
 
setenv = 
 
    TEST_DB=postgresql://postgres:qwe@localhost/rhodecode_test
 

	
 

	
 
#### PYTHON 2.7 ####
 
[testenv:py27-sqlite]
 
basepython =
 
    python2.7
 
commands =
 
    nosetests
 
setenv = 
 
    TEST_DB=sqlite:////tmp/rhodecode_test.sqlite
 

	
 
[testenv:py27]
 
[testenv:py27-mysql]
 
basepython =
 
    python2.7
 
commands =
 
    mysql -uroot -pqwe -e 'drop database if exists rhodecode_test;'
 
    mysql -uroot -pqwe -e 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    mysql-python
 
setenv = 
 
    TEST_DB=mysql://root:qwe@localhost/rhodecode_test
 

	
 
[testenv:py27-postgresql]
 
basepython =
 
    python2.7
 
commands =
 
    psql -Upostgres -Wqwe -hlocalhost -c 'drop database if exists rhodecode_test;'
 
    psql -Upostgres -Wqwe -hlocalhost -c 'create database rhodecode_test;'
 
    nosetests
 
deps =
 
    psycopg2    
 
setenv = 
 
    TEST_DB=postgresql://postgres:qwe@localhost/rhodecode_test        
 
\ No newline at end of file
0 comments (0 inline, 0 general)