CD/CD consolidation
This commit is contained in:
14
devops/tools/tests/run-policy-cli-tests.ps1
Normal file
14
devops/tools/tests/run-policy-cli-tests.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
# Runs PolicyValidationCliTests using the minimal policy-only solution with graph build disabled.
|
||||
|
||||
$Root = Split-Path -Parent (Split-Path -Parent $PSCommandPath)
|
||||
Set-Location $Root
|
||||
|
||||
$env:DOTNET_DISABLE_BUILTIN_GRAPH = "1"
|
||||
|
||||
$solution = "src/Policy/StellaOps.Policy.only.sln"
|
||||
|
||||
dotnet restore $solution -v minimal
|
||||
dotnet build src/Policy/__Tests/StellaOps.Policy.Tests/StellaOps.Policy.Tests.csproj -c Release --no-restore /p:BuildProjectReferences=false
|
||||
dotnet test $solution -c Release --no-build --filter FullyQualifiedName~PolicyValidationCliTests
|
||||
15
devops/tools/tests/run-policy-cli-tests.sh
Normal file
15
devops/tools/tests/run-policy-cli-tests.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Run PolicyValidationCliTests with a minimal solution and graph-build disabled.
|
||||
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
export DOTNET_DISABLE_BUILTIN_GRAPH=1
|
||||
|
||||
SOLUTION="src/Policy/StellaOps.Policy.only.sln"
|
||||
|
||||
dotnet restore "$SOLUTION" -v minimal
|
||||
dotnet build src/Policy/__Tests/StellaOps.Policy.Tests/StellaOps.Policy.Tests.csproj -c Release --no-restore /p:BuildProjectReferences=false
|
||||
dotnet test "$SOLUTION" -c Release --no-build --filter FullyQualifiedName~PolicyValidationCliTests
|
||||
Reference in New Issue
Block a user