Skip to content
This repository was archived by the owner on Jul 19, 2024. It is now read-only.

Failing tests fails build #9

Merged
merged 1 commit into from
Jul 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ install:
- "echo \"GitVersion says: ${GitVersion_Version} \""

script:
- pwsh -c "Invoke-Psake -buildFile Build.ps1 -taskList build,test"
- pwsh -f "./Invoke-Tests.ps1"

deploy:
skip_cleanup: true
provider: script
script: pwsh -c "Invoke-Psake -buildFile Build.ps1 -taskList build,test,publish"
script: pwsh -f "./Invoke-Publish.ps1"
on:
tags: true
branch: master
2 changes: 1 addition & 1 deletion Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Task Test -depends Build {

if ($TestResult.FailedCount -gt 0) {
$TestResult | Format-List
Write-Error -Message 'One or more tests for the module failed. Failing the build.'
throw 'One or more tests for the module failed. Failing the build.'
}
}

Expand Down
2 changes: 2 additions & 0 deletions Invoke-Publish.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Invoke-Psake -buildFile Build.ps1 -taskList build,test,publish
exit ( [int]( -not $psake.build_success ) )
2 changes: 2 additions & 0 deletions Invoke-Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Invoke-Psake -buildFile Build.ps1 -taskList build,test
exit ( [int]( -not $psake.build_success ) )
2 changes: 1 addition & 1 deletion Tests/Get-CrumbHeader.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Describe 'Get-CrumbHeader method' {

$crumbHeader = Get-CrumbHeader -UserName $user -Password $pass
Assert-MockCalled -CommandName Invoke-RestMethod -Exactly 1
$crumbHeader | Should -BeExactly "requestfield=headerdata"
$crumbHeader | Should -BeExactly "requestfield=headerdata"
}
}

Expand Down