10000 Merge pull request #1276 from TomasVotruba/travis-coverage-speedup · symfonyaml/orm@ba04c98 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba04c98

Browse files
committed
Merge pull request doctrine#1276 from TomasVotruba/travis-coverage-speedup
[2.4] travis: run coverage just once
2 parents ec84953 + 5d637af commit ba04c98

File tree

4 files changed

+7
-18
lines changed

4 files changed

+7
-18
lines changed

.travis.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ env:
1212
- DB=sqlite
1313

1414
before_script:
15-
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
16-
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
17-
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
18-
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi"
19-
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
15+
- if [[ $TRAVIS_PHP_VERSION = '5.6' && $DB = 'sqlite' ]]; then PHPUNIT_FLAGS="--coverage-clover ./build/logs/clover.xml"; else PHPUNIT_FLAGS=""; fi
16+
- if [ $DB = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi
17+
- if [ $DB = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi
18+
- if [ $DB = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi
19+
- if [ $DB = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi
20+
- if [ $DB = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi
2021
- composer install --prefer-dist --dev
2122

22-
script: phpunit --configuration tests/travis/$DB.travis.xml
23+
script: phpunit $PHPUNIT_FLAGS --configuration tests/travis/$DB.travis.xml
2324

2425
after_script:
2526
- php vendor/bin/coveralls -v

tests/travis/mysql.travis.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616
<var name="tmpdb_port" value="3306"/>
1717
</php>
1818

19-
<logging>
20-
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
21-
</logging>
22-
2319
<testsuites>
2420
<testsuite name="Doctrine ORM Test Suite">
2521
<directory>./../Doctrine/Tests/ORM</directory>

tests/travis/pgsql.travis.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,6 @@
1919
<var name="tmpdb_port" value="5432"/>
2020
</php>
2121

22-
<logging>
23-
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
24-
</logging>
25-
2622
<testsuites>
2723
<testsuite name="Doctrine ORM Test Suite">
2824
<directory>./../Doctrine/Tests/ORM</directory>

tests/travis/sqlite.travis.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<phpunit>
33

4-
<logging>
5-
<log type="coverage-clover" target="../../build/logs/clover.xml"/>
6-
</logging>
7-
84
<testsuites>
95
<testsuite name="Doctrine ORM Test Suite">
106
<directory>./../Doctrine/Tests/ORM</directory>

0 commit comments

Comments
 (0)
0