diff --git a/.appveyor.yml b/.appveyor.yml
index ee2043667ca..5001e754a95 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -20,19 +20,23 @@ environment:
- db: mssql
driver: sqlsrv
db_version: sql2008r2sp2
+ coverage: yes
php: 7.2
- db: mssql
driver: sqlsrv
db_version: sql2012sp1
php: 7.2
+ coverage: yes
- db: mssql
driver: sqlsrv
db_version: sql2017
+ coverage: no
php: 7.2
- db: mssql
driver: pdo_sqlsrv
db_version: sql2017
php: 7.2
+ coverage: yes
init:
- SET PATH=C:\Program Files\OpenSSL;c:\tools\php;%PATH%
@@ -59,6 +63,7 @@ install:
Add-Content php.ini "`n extension=php_fileinfo.dll"
Add-Content php.ini "`n extension=php_pdo_sqlite.dll"
Add-Content php.ini "`n extension=php_sqlite3.dll"
+ Add-Content php.ini "`n extension=php_curl.dll"
# Get and install the MSSQL DLL's
$DLLVersion = "5.2.0rc1"
@@ -71,10 +76,15 @@ install:
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
+ $DLLVersion = "2.6.0"
+ $source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll"
+ $destination = "c:\tools\php\ext\php_xdebug.dll"
+ Invoke-WebRequest $source -OutFile $destination
Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
+ Add-Content php.ini "`nzend_extension=php_xdebug.dll"
Add-Content php.ini "`n"
cd c:\projects\dbal
@@ -82,6 +92,10 @@ install:
if (!(Test-Path c:\projects\dbal\composer.phar)) {
appveyor-retry appveyor DownloadFile https://getcomposer.org/composer.phar
}
+
+ if (!(Test-Path c:\projects\dbal\ocular.phar)) {
+ appveyor-retry appveyor DownloadFile https://scrutinizer-ci.com/ocular.phar
+ }
}
# install composer dependencies
- rm composer.lock
@@ -100,8 +114,14 @@ test_script:
- cd C:\projects\dbal
- ps: >-
if ($env:db_version) {
- vendor\bin\phpunit -c tests\appveyor\%db%.%db_version%.%driver%.appveyor.xml
+ $env:phpunit_config = "tests\appveyor\$($env:db).$($env:db_version).$($env:driver).appveyor.xml"
+ } else {
+ $env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
}
- else {
- vendor\bin\phpunit -c tests\appveyor\%db%.%driver%.appveyor.xml
+ - ps: >-
+ if ($env:coverage -eq "yes") {
+ vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
+ php.exe ocular.phar code-coverage:upload --repository $($env:APPVEYOR_REPO_NAME) --revision $($env:APPVEYOR_REPO_COMMIT) --format=php-clover clover.xml
+ } else {
+ vendor\bin\phpunit -c $($env:phpunit_config)
}
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 56a0bf721ab..63452535f39 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -21,6 +21,7 @@ before_commands:
tools:
external_code_coverage:
timeout: 3600
+ runs: 20 # 21 # 17x Travis (jobs with COVERAGE=yes) + 3x AppVeyor + 1x ContinuousPHP
filter:
excluded_paths:
diff --git a/.travis.yml b/.travis.yml
index 4d30bbd11c3..0d578c11545 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,26 +18,67 @@ env:
- DB=mysqli
before_install:
- - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
+ - |
+ if [ "x$COVERAGE" != "xyes" ]; then
+ mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || true
+ fi
before_script:
- if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi;
+ - |
+ if [ "x$COVERAGE" == "xyes" ] && [[ ! $(php -m | grep -si xdebug) ]]; then
+ echo "xdebug is required for coverage"
+ exit 1
+ fi
install:
- rm composer.lock
- travis_retry composer -n update --prefer-dist
-script: ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
+script:
+ - |
+ if [ "x$COVERAGE" == "xyes" ]; then
+ ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
+ else
+ ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml
+ fi
+
+after_script:
+ - |
+ if [ "x$COVERAGE" == "xyes" ]; then
+ wget https://scrutinizer-ci.com/ocular.phar
+ php ocular.phar code-coverage:upload --format=php-clover clover.xml
+ fi
jobs:
allow_failures:
- php: nightly
- stage: Coding standard
+ exclude:
+ - php: 7.1
+ env: DB=sqlite
+ - php: 7.1
+ env: DB=mysql
+ - php: 7.1
+ env: DB=mysqli
+
include:
- stage: Test
php: 7.1
- env: DB=mysql MYSQL_VERSION=5.7
+ env: DB=sqlite COVERAGE=yes
+
+ - stage: Test
+ php: 7.1
+ env: DB=mysql COVERAGE=yes
+
+ - stage: Test
+ php: 7.1
+ env: DB=mysqli COVERAGE=yes
+
+ - stage: Test
+ php: 7.1
+ env: DB=mysql MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
@@ -56,7 +97,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=mysqli MYSQL_VERSION=5.7
+ env: DB=mysqli MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
@@ -75,7 +116,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=mariadb MARIADB_VERSION=10.0
+ env: DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0
- stage: Test
@@ -91,7 +132,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=mariadb MARIADB_VERSION=10.1
+ env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1
- stage: Test
@@ -107,7 +148,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=mariadb MARIADB_VERSION=10.2
+ env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2
- stage: Test
@@ -123,7 +164,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=mariadb.mysqli MARIADB_VERSION=10.2
+ env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2
- stage: Test
@@ -139,7 +180,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=9.2
+ env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services:
- postgresql
addons:
@@ -161,7 +202,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=9.3
+ env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services:
- postgresql
addons:
@@ -183,7 +224,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=9.4
+ env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
services:
- postgresql
addons:
@@ -205,7 +246,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=9.5
+ env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
services:
- postgresql
addons:
@@ -227,7 +268,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=9.6
+ env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
services:
- postgresql
addons:
@@ -249,7 +290,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pgsql POSTGRESQL_VERSION=10.0
+ env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
sudo: required
services:
- postgresql
@@ -279,7 +320,7 @@ jobs:
- bash ./tests/travis/install-postgres-10.sh
- stage: Test
- env: DB=sqlsrv
+ env: DB=sqlsrv COVERAGE=yes
sudo: required
services:
- docker
@@ -298,7 +339,7 @@ jobs:
- stage: Test
php: 7.1
- env: DB=pdo_sqlsrv
+ env: DB=pdo_sqlsrv COVERAGE=yes
sudo: required
services:
- docker
@@ -329,18 +370,6 @@ jobs:
- composer config minimum-stability dev
- travis_retry composer update --prefer-dist
- - stage: Coverage
- php: 7.1
- env: DB=sqlite
- before_script:
- - mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- - if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
- script:
- - ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
- after_script:
- - wget https://scrutinizer-ci.com/ocular.phar
- - php ocular.phar code-coverage:upload --format=php-clover clover.xml
-
- stage: Pull request coding standard
if: type = pull_request
php: 7.1
diff --git a/tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml b/tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
index a65eef027ee..03fd0051e2f 100644
--- a/tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
+++ b/tests/appveyor/mssql.sql2008r2sp2.sqlsrv.appveyor.xml
@@ -32,6 +32,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml b/tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
index fb6013d31d5..e508e831281 100644
--- a/tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
+++ b/tests/appveyor/mssql.sql2012sp1.sqlsrv.appveyor.xml
@@ -32,6 +32,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml b/tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
index 15331f2f5a2..ba2b8d98b60 100644
--- a/tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
+++ b/tests/appveyor/mssql.sql2017.pdo_sqlsrv.appveyor.xml
@@ -32,6 +32,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml b/tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
index 4a14c5d318a..6062bed04cf 100644
--- a/tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
+++ b/tests/appveyor/mssql.sql2017.sqlsrv.appveyor.xml
@@ -32,6 +32,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/continuousphp/oci8.phpunit.continuousphp.xml b/tests/continuousphp/oci8.phpunit.continuousphp.xml
index 77b21b3c579..09e18cdd455 100644
--- a/tests/continuousphp/oci8.phpunit.continuousphp.xml
+++ b/tests/continuousphp/oci8.phpunit.continuousphp.xml
@@ -35,6 +35,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/mariadb.mysqli.travis.xml b/tests/travis/mariadb.mysqli.travis.xml
index 5bc5b185fe5..cee35b5f7a2 100644
--- a/tests/travis/mariadb.mysqli.travis.xml
+++ b/tests/travis/mariadb.mysqli.travis.xml
@@ -32,6 +32,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/mariadb.travis.xml b/tests/travis/mariadb.travis.xml
index ed4c9d40dc3..f30d320f4e8 100644
--- a/tests/travis/mariadb.travis.xml
+++ b/tests/travis/mariadb.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/mysql.travis.xml b/tests/travis/mysql.travis.xml
index ed4c9d40dc3..f30d320f4e8 100644
--- a/tests/travis/mysql.travis.xml
+++ b/tests/travis/mysql.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/mysqli.travis.xml b/tests/travis/mysqli.travis.xml
index 39bd48ee608..be929ea7be9 100644
--- a/tests/travis/mysqli.travis.xml
+++ b/tests/travis/mysqli.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/pdo_sqlsrv.travis.xml b/tests/travis/pdo_sqlsrv.travis.xml
index f2a7853e1a2..dbfac4f976d 100644
--- a/tests/travis/pdo_sqlsrv.travis.xml
+++ b/tests/travis/pdo_sqlsrv.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/pgsql.travis.xml b/tests/travis/pgsql.travis.xml
index a69909f0ccf..e2250c10249 100644
--- a/tests/travis/pgsql.travis.xml
+++ b/tests/travis/pgsql.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance
diff --git a/tests/travis/sqlsrv.travis.xml b/tests/travis/sqlsrv.travis.xml
index dac8bb4106e..806cfdf0c71 100644
--- a/tests/travis/sqlsrv.travis.xml
+++ b/tests/travis/sqlsrv.travis.xml
@@ -33,6 +33,12 @@
+
+
+ ./../../lib/Doctrine
+
+
+
performance