Initial commit to new repository
This commit is contained in:
42
scripts/release-gate.ps1
Normal file
42
scripts/release-gate.ps1
Normal file
@@ -0,0 +1,42 @@
|
||||
param(
|
||||
[switch]$SkipFullTest
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function Invoke-Step {
|
||||
param(
|
||||
[Parameter(Mandatory = $true)][string]$Name,
|
||||
[Parameter(Mandatory = $true)][scriptblock]$Action
|
||||
)
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "==> $Name"
|
||||
& $Action
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Step failed: $Name"
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "Release gate started"
|
||||
Write-Host "Workspace: $PSScriptRoot\.."
|
||||
|
||||
Push-Location (Join-Path $PSScriptRoot "..")
|
||||
try {
|
||||
Invoke-Step -Name "Build (warnings/errors gate)" -Action { dotnet build }
|
||||
Invoke-Step -Name "Parity benchmark suite" -Action { dotnet test --filter "Suite=ParityBenchmark" }
|
||||
Invoke-Step -Name "Replay stability suite" -Action { dotnet test --filter "Suite=ReplayStability" }
|
||||
|
||||
if (-not $SkipFullTest) {
|
||||
Invoke-Step -Name "Full test suite" -Action { dotnet test }
|
||||
} else {
|
||||
Write-Host ""
|
||||
Write-Host "==> Full test suite skipped by -SkipFullTest"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "Release gate passed"
|
||||
}
|
||||
finally {
|
||||
Pop-Location
|
||||
}
|
||||
Reference in New Issue
Block a user