Switch from Xdebug to pcov on AppVeyor

parent ecbe9e42
...@@ -20,22 +20,18 @@ environment: ...@@ -20,22 +20,18 @@ environment:
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2008r2sp2 db_version: sql2008r2sp2
coverage: yes
php: 7.3 php: 7.3
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2012sp1 db_version: sql2012sp1
coverage: yes
php: 7.3 php: 7.3
- db: mssql - db: mssql
driver: sqlsrv driver: sqlsrv
db_version: sql2017 db_version: sql2017
coverage: no
php: 7.3 php: 7.3
- db: mssql - db: mssql
driver: pdo_sqlsrv driver: pdo_sqlsrv
db_version: sql2017 db_version: sql2017
coverage: yes
php: 7.3 php: 7.3
init: init:
...@@ -78,15 +74,14 @@ install: ...@@ -78,15 +74,14 @@ install:
$destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip" $destination = "c:\tools\php\ext\php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip"
Invoke-WebRequest $source -OutFile $destination Invoke-WebRequest $source -OutFile $destination
7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null 7z x -y php_pdo_sqlsrv-$($DLLVersion)-$($env:php)-nts-vc15-x64.zip > $null
$DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/xdebug/stable.txt").Content $DLLVersion = (Invoke-WebRequest "https://pecl.php.net/rest/r/pcov/stable.txt").Content
$source = "https://xdebug.org/files/php_xdebug-$($DLLVersion)-$($env:php)-vc15-nts-x86_64.dll" Invoke-WebRequest https://windows.php.net/downloads/pecl/releases/pcov/$($DLLVersion)/php_pcov-$($DLLVersion)-7.3-nts-vc15-$($env:platform).zip -OutFile pcov.zip
$destination = "c:\tools\php\ext\php_xdebug.dll" 7z x -y pcov.zip > $null
Invoke-WebRequest $source -OutFile $destination
Remove-Item c:\tools\php\* -include .zip Remove-Item c:\tools\php\* -include .zip
cd c:\tools\php cd c:\tools\php
Add-Content php.ini "`nextension=php_sqlsrv.dll" Add-Content php.ini "`nextension=php_sqlsrv.dll"
Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll" Add-Content php.ini "`nextension=php_pdo_sqlsrv.dll"
Add-Content php.ini "`nzend_extension=php_xdebug.dll" Add-Content php.ini "`nextension=php_pcov.dll"
Add-Content php.ini "`n" Add-Content php.ini "`n"
# download Composer # download Composer
...@@ -127,11 +122,7 @@ test_script: ...@@ -127,11 +122,7 @@ test_script:
$env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml" $env:phpunit_config = "tests\appveyor\$($env:db).$($env:driver).appveyor.xml"
} }
if ($env:coverage -eq "yes") { vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
} else {
vendor\bin\phpunit -c $($env:phpunit_config)
}
if ($LastExitCode -ne 0) { if ($LastExitCode -ne 0) {
$host.SetShouldExit($LastExitCode) $host.SetShouldExit($LastExitCode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment