Skip to content

Commit

Permalink
CI config for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guirava committed Mar 14, 2024
1 parent 69bf3a8 commit 745aca6
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion Utils/Test-RscSdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,28 @@ param(
[switch]$SkipUnitTests = $false,
[switch]$SkipE2ETests = $false,
[switch]$SkipCoreTests = $false,
[switch]$SkipToolkitTests = $false
[switch]$SkipToolkitTests = $false,
[switch]$CI = $false
)
# Change to the root of the repository
Set-Location $PSScriptRoot\..

# Stop on error
$ErrorActionPreference = "Stop"

# Set up
if ($CI) {
Set-Location $PSScriptRoot\..
.\Utils\Import-RscModuleFromLocalOutputDir.ps1
if ($env:RSC_SERVICE_ACCOUNT_FILE) {
$serviceAccountFile = $env:RSC_SERVICE_ACCOUNT_FILE
Set-RscServiceAccountFile -InputFilePath $serviceAccountFile -DisablePrompts -KeepOriginalClearTextFile
} else {
Write-Error "Environment variable RSC_SERVICE_ACCOUNT_FILE not set."
}
}

# Run tests
if ( -not $SkipUnitTests ) {
if ( -not $SkipCoreTests ) {
# Run Core unit tests (Pester)
Expand Down

0 comments on commit 745aca6

Please sign in to comment.