Skip to content

Commit

Permalink
Merge pull request #1276 from TomasVotruba/travis-coverage-speedup
Browse files Browse the repository at this point in the history
[2.4] travis: run coverage just once
  • Loading branch information
Ocramius committed Jan 22, 2015
2 parents ec84953 + 5d637af commit ba04c98
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ env:
- 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"
- if [[ $TRAVIS_PHP_VERSION = '5.6' && $DB = 'sqlite' ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else PHPUNIT_FLAGS=""; fi
- if [ $DB = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi
- if [ $DB = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi
- if [ $DB = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi
- if [ $DB = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi
- if [ $DB = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi
- composer install --prefer-dist --dev

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

after_script:
- php vendor/bin/coveralls -v
4 changes: 0 additions & 4 deletions tests/travis/mysql.travis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
<var name="tmpdb_port" value="3306"/>
</php>

<logging>
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
</logging>

<testsuites>
<testsuite name="Doctrine ORM Test Suite">
<directory>./../Doctrine/Tests/ORM</directory>
Expand Down
4 changes: 0 additions & 4 deletions tests/travis/pgsql.travis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<var name="tmpdb_port" value="5432"/>
</php>

<logging>
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
</logging>

<testsuites>
<testsuite name="Doctrine ORM Test Suite">
<directory>./../Doctrine/Tests/ORM</directory>
Expand Down
4 changes: 0 additions & 4 deletions tests/travis/sqlite.travis.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit>

<logging>
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
</logging>

<testsuites>
<testsuite name="Doctrine ORM Test Suite">
<directory>./../Doctrine/Tests/ORM</directory>
Expand Down

0 comments on commit ba04c98

Please sign in to comment.