Skip to content

Commit

Permalink
Fail build on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
morozov committed Feb 7, 2019
1 parent 92920ed commit 29e806b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ init:
## Install PHP and composer, and run the appropriate composer command
install:
- ps: |
$ErrorActionPreference = "Stop"
# Check if installation is cached
if (!(Test-Path c:\tools\php)) {
appveyor-retry cinst --params '""/InstallDir:C:\tools\php""' --ignore-checksums -y php --version ((choco search php --exact --all-versions -r | select-string -pattern $env:php | sort { [version]($_ -split '\|' | select -last 1) } -Descending | Select-Object -first 1) -replace '[php|]','')
Expand Down Expand Up @@ -125,6 +127,8 @@ install:
before_test:
# Selectively start the services
- ps: >-
$ErrorActionPreference = "Stop"
if ($env:db -eq "mssql") {
$instanceName = $env:db_version.ToUpper()
net start "MSSQL`$$instanceName"
Expand All @@ -133,12 +137,14 @@ before_test:
test_script:
- cd C:\projects\dbal
- ps: >-
$ErrorActionPreference = "Stop"
if ($env:db_version) {
$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"
}
- ps: >-
if ($env:coverage -eq "yes") {
vendor\bin\phpunit -c $($env:phpunit_config) --coverage-clover clover.xml
appveyor-retry ocular code-coverage:upload --format=php-clover clover.xml
Expand Down

0 comments on commit 29e806b

Please sign in to comment.