up
Some checks failed
api-governance / spectral-lint (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
SDK Publish & Sign / sdk-publish (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Policy Simulation / policy-simulate (push) Has been cancelled
devportal-offline / build-offline (push) Has been cancelled
Some checks failed
api-governance / spectral-lint (push) Has been cancelled
Docs CI / lint-and-preview (push) Has been cancelled
oas-ci / oas-validate (push) Has been cancelled
SDK Publish & Sign / sdk-publish (push) Has been cancelled
Policy Lint & Smoke / policy-lint (push) Has been cancelled
Policy Simulation / policy-simulate (push) Has been cancelled
devportal-offline / build-offline (push) Has been cancelled
This commit is contained in:
14
scripts/tests/run-policy-cli-tests.ps1
Normal file
14
scripts/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
scripts/tests/run-policy-cli-tests.sh
Normal file
15
scripts/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