43 lines
1.1 KiB
PowerShell
43 lines
1.1 KiB
PowerShell
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 --no-build --filter "Suite=ParityBenchmark" }
|
|
Invoke-Step -Name "Replay stability suite" -Action { dotnet test --no-build --filter "Suite=ReplayStability" }
|
|
|
|
if (-not $SkipFullTest) {
|
|
Invoke-Step -Name "Full test suite" -Action { dotnet test --no-build }
|
|
} else {
|
|
Write-Host ""
|
|
Write-Host "==> Full test suite skipped by -SkipFullTest"
|
|
}
|
|
|
|
Write-Host ""
|
|
Write-Host "Release gate passed"
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
}
|