Skip to content

Commit

Permalink
Merge travis support done by @pborreli
Browse files Browse the repository at this point in the history
  • Loading branch information
beberlei committed Nov 13, 2011
1 parent 7da630a commit a0ba0af
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
@@ -0,0 +1,20 @@
language: php

php:
- 5.3
- 5.4
env:
- DB=mysql
- DB=pgsql
- DB=sqlite

before_script:
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
- git submodule update --init

script: phpunit --configuration tests/travis/$DB.travis.xml

32 changes: 32 additions & 0 deletions tests/travis/mysql.travis.xml
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<php>
<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="localhost" />
<!--var name="db_username" value="" /-->
<!--var name="db_password" value="" /-->
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="3306"/>

<var name="tmpdb_type" value="pdo_mysql"/>
<var name="tmpdb_host" value="localhost" />
<!--var name="tmpdb_username" value="" /-->
<!--var name="tmpdb_password" value="" /-->
<var name="tmpdb_name" value="doctrine_tests_tmp" />
<var name="tmpdb_port" value="3306"/>
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>

</phpunit>

29 changes: 29 additions & 0 deletions tests/travis/pgsql.travis.xml
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<php>
<var name="db_type" value="pdo_pgsql"/>
<var name="db_host" value="localhost" />
<var name="db_username" value="postgres" />
<var name="db_password" value="" />
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="5432"/>

<var name="tmpdb_type" value="pdo_pgsql"/>
<var name="tmpdb_host" value="localhost" />
<var name="tmpdb_username" value="postgres" />
<var name="tmpdb_password" value="" />
<var name="tmpdb_name" value="doctrine_tests_tmp" />
<var name="tmpdb_port" value="5432"/>
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
14 changes: 14 additions & 0 deletions tests/travis/sqlite.travis.xml
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>./../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>

0 comments on commit a0ba0af

Please sign in to comment.