Skip to content

Commit

Permalink
build(windows): fail build if commands fail, because, Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Mar 6, 2020
1 parent 43cfdd4 commit d25becc
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/pact.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,19 @@ foreach ($package in $packages) {

# Run integration tests
Write-Host "--> Testing E2E examples"

Write-Host "Running consumer tests"
go test -tags=consumer -count=1 github.com/pact-foundation/pact-go/examples/... -run TestExample
if ($LastExitCode -ne 0) {
Write-Host "ERROR: Test failed, logging failure"
$exitCode=1
}

Write-Host "Running provider tests"
go test -tags=provider -count=1 github.com/pact-foundation/pact-go/examples/... -run TestExample
if ($LastExitCode -ne 0) {
Write-Host "ERROR: Test failed, logging failure"
$exitCode=1
}

# Shutdown
Write-Host "Shutting down any remaining pact processes :)"
Expand Down

0 comments on commit d25becc

Please sign in to comment.