forked from pester/Pester
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
94 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -585,4 +585,4 @@ InModuleScope -ModuleName Pester { | |
Should -BeTrue | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# build should provide '%system.teamcity.build.checkoutDir%' | ||
param ( | ||
[Parameter(Mandatory)] | ||
[String] $CertificateThumbprint, | ||
[Parameter(Mandatory)] | ||
[String] $NugetApiKey, | ||
[String] $ChocolateyApiKey, | ||
[Parameter(Mandatory)] | ||
[String] $PsGalleryApiKey | ||
|
||
|
||
|
||
) | ||
|
||
$ErrorActionPreference = 'Stop' | ||
# run this in seperate instance otherwise Gherkin.dll is loaded and | ||
$process = Start-Process powershell -ArgumentList "-c", ".\testRelease.ps1 -LocalBuild" -NoNewWindow -Wait -PassThru | ||
|
||
if ($process.ExitCode -ne 0) { | ||
throw "Testing failed with exit code $($process.ExitCode)." | ||
} | ||
|
||
.\getNugetExe.ps1 | ||
.\cleanUpBeforeBuild.ps1 | ||
.\signModule.ps1 -Thumbprint $CertificateThumbprint | ||
.\buildNugetPackage.ps1 | ||
.\buildPSGalleryPackage.ps1 | ||
|
||
|
||
# .\publishPSGalleryPackage.ps1 $PsGalleryApiKey | ||
# publish nuget | ||
# publish chocolatey |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
param( | ||
[switch] $LocalBuild | ||
) | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
$psd1 = Join-Path $PSScriptRoot Pester.psd1 | ||
|
||
Get-Module Pester | Remove-Module | ||
Import-Module $psd1 -ErrorAction Stop | ||
|
||
$xml = Join-Path $PSScriptRoot Test.Version.xml | ||
$result = Invoke-Pester -Path $PSScriptRoot -Tag VersionChecks, StyleRules -OutputFile $xml -OutputFormat NUnitXml -PassThru -Strict -ErrorAction Stop | ||
|
||
if ($LocalBuild) { | ||
# when I build release locally I don't want to | ||
# think about removing the xml all the time | ||
Remove-Item $xml | ||
} | ||
|
||
if ($result.TotalCount -lt 1) | ||
{ | ||
$m = "No tests were run." | ||
|
||
if ($LocalBuild) { | ||
$m | ||
exit 9999 | ||
} | ||
else { | ||
throw $m | ||
} | ||
} | ||
|
||
if ($result.FailedCount -gt 0) | ||
{ | ||
$m = "$($result.FailedCount) tests did not pass." | ||
if ($LocalBuild) { | ||
$m | ||
exit $result.FailedCount | ||
} | ||
else | ||
{ | ||
throw $m | ||
} | ||
} |