CD/CD consolidation

This commit is contained in:
StellaOps Bot
2025-12-26 17:32:23 +02:00
parent a866eb6277
commit c786faae84
638 changed files with 3821 additions and 181 deletions

View File

@@ -0,0 +1,45 @@
# scripts/test-lane.ps1
# Runs tests filtered by lane (Unit, Contract, Integration, Security, Performance, Live)
#
# Usage:
# .\scripts\test-lane.ps1 Unit
# .\scripts\test-lane.ps1 Integration -ResultsDirectory .\test-results
# .\scripts\test-lane.ps1 Security -Logger "trx;LogFileName=security-tests.trx"
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=0)]
[ValidateSet('Unit', 'Contract', 'Integration', 'Security', 'Performance', 'Live')]
[string]$Lane,
[Parameter(ValueFromRemainingArguments=$true)]
[string[]]$DotNetTestArgs
)
$ErrorActionPreference = 'Stop'
Write-Host "Running tests for lane: $Lane" -ForegroundColor Cyan
# Build trait filter for xUnit
# Format: --filter "Lane=$Lane"
$filterArg = "--filter", "Lane=$Lane"
# Build full dotnet test command
$testArgs = @(
'test'
$filterArg
'--configuration', 'Release'
'--no-build'
) + $DotNetTestArgs
Write-Host "Executing: dotnet $($testArgs -join ' ')" -ForegroundColor Gray
# Execute dotnet test
& dotnet $testArgs
if ($LASTEXITCODE -ne 0) {
Write-Error "Tests failed with exit code $LASTEXITCODE"
exit $LASTEXITCODE
}
Write-Host "Lane '$Lane' tests completed successfully" -ForegroundColor Green