mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
25 lines
636 B
PowerShell
25 lines
636 B
PowerShell
param (
|
|
[Parameter(Mandatory=$true)]
|
|
$WorkingDirectory,
|
|
[Parameter(Mandatory=$true)]
|
|
$OutputFile
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
Import-Module Pester
|
|
Set-Location -Path $WorkingDirectory
|
|
|
|
$parentDirectory = Split-Path $OutputFile -Parent
|
|
if (-not (Test-Path $parentDirectory)) { New-Item -Path $parentDirectory -ItemType Directory | Out-Null }
|
|
|
|
$configuration = [PesterConfiguration] @{
|
|
Output = @{ Verbosity = "Detailed" }
|
|
TestResult = @{
|
|
Enabled = $true
|
|
OutputPath = $OutputFile;
|
|
OutputFormat = "NUnitXML"
|
|
}
|
|
}
|
|
|
|
Invoke-Pester -Configuration $configuration |