|
| 1 | +version: '{build}' |
| 2 | + |
| 3 | +platform: |
| 4 | + - x64 |
| 5 | + |
| 6 | +skip_tags: true |
| 7 | +skip_branch_with_pr: true |
| 8 | +clone_depth: 1 |
| 9 | +max_jobs: 3 |
| 10 | + |
| 11 | +cache: |
| 12 | + - '%LOCALAPPDATA%\Composer' |
| 13 | + |
| 14 | +environment: |
| 15 | + ANSICON: 121x90 (121x90) |
| 16 | + matrix: |
| 17 | + - { PHP_VERSION: '7.1.11', VC_VERSION: '14', XDEBUG_VERSION: '2.5.5' } |
| 18 | + |
| 19 | +install: |
| 20 | + # Enable Windows Update service, needed to install vcredist2015 (dependency of php) |
| 21 | + - ps: Set-Service wuauserv -StartupType Manual |
| 22 | + - choco install -y php --version %PHP_VERSION% |
| 23 | + - choco install -y composer |
| 24 | + - refreshenv |
| 25 | + - composer install --no-interaction --no-progress --prefer-dist |
| 26 | + # Install XDebug for code coverage |
| 27 | + - ps: | |
| 28 | + $client = New-Object System.Net.WebClient |
| 29 | + $phpMinorVersion = $env:PHP_VERSION -replace '\.\d+$' |
| 30 | + $xdebugUrl = "https://xdebug.org/files/php_xdebug-$env:XDEBUG_VERSION-$phpMinorVersion-vc14-nts-x86_64.dll" |
| 31 | + $phpDir = (Get-Item (Get-Command php).Source).Directory.FullName |
| 32 | + $xdebugPath = Join-Path $phpDir ext\xdebug.dll |
| 33 | + $client.DownloadFile($xdebugUrl, $xdebugPath) |
| 34 | + $phpIniPath = Join-Path $phpDir php.ini |
| 35 | + Add-Content $phpIniPath @" |
| 36 | + zend_extension=$xdebugPath |
| 37 | + "@ |
| 38 | +
|
| 39 | +build: off |
| 40 | + |
| 41 | +test_script: |
| 42 | + - vendor\bin\phpunit --coverage-clover=coverage/coverage.xml |
| 43 | + |
| 44 | +after_test: |
| 45 | + - ps: | |
| 46 | + # Delete vendor because it causes problems with codecovs report search |
| 47 | + # https://github.com/codecov/codecov-bash/issues/96 |
| 48 | + Remove-Item -Recurse -Force vendor |
| 49 | + $env:PATH = 'C:\msys64\usr\bin;' + $env:PATH |
| 50 | + Invoke-WebRequest -Uri 'https://codecov.io/bash' -OutFile codecov.sh |
| 51 | + bash codecov.sh -f 'coverage/coverage.xml' |
0 commit comments