47 lines
1.7 KiB
PowerShell
47 lines
1.7 KiB
PowerShell
param(
|
|
[switch]$SkipSmoke,
|
|
[switch]$SkipApi
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$repoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..")).Path
|
|
$parityReport = Join-Path $repoRoot "logs\parity_harness_results.json"
|
|
|
|
Write-Host "migration-gate: repo root = $repoRoot"
|
|
|
|
Push-Location $repoRoot
|
|
try {
|
|
Write-Host "migration-gate: building sidecar and api binaries..."
|
|
& "$repoRoot\scripts\dotnet-min.ps1" build journal-master/journal/Journal.Sidecar/Journal.Sidecar.csproj
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
& "$repoRoot\scripts\dotnet-min.ps1" build journal-master/journal/Journal.Api/Journal.Api.csproj
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
if (-not $SkipSmoke) {
|
|
Write-Host "migration-gate: running csharp smoke tests..."
|
|
& "$repoRoot\scripts\dotnet-min.ps1" run --project journal-master/journal/Journal.SmokeTests/Journal.SmokeTests.csproj
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
} else {
|
|
Write-Host "migration-gate: skipping smoke tests (--SkipSmoke)."
|
|
}
|
|
|
|
Write-Host "migration-gate: running parity harness + fixture matrix..."
|
|
$env:PARITY_HARNESS_REPORT = $parityReport
|
|
& python -m unittest discover -s tests -p "test_parity_harness.py" -v
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
|
|
if (-not $SkipApi) {
|
|
Write-Host "migration-gate: running API contract tests..."
|
|
& python -m unittest discover -s tests -p "test_api_contract.py" -v
|
|
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
|
|
} else {
|
|
Write-Host "migration-gate: skipping API contract tests (--SkipApi)."
|
|
}
|
|
|
|
Write-Host "migration-gate: PASS"
|
|
Write-Host "migration-gate: parity report => $parityReport"
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
}
|