Files
renovate[bot] 1bd7faf657 chore(deps): update official github actions (#182)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-10-08 08:43:07 -04:00

51 lines
1.6 KiB
YAML

---
name: CI-PowerShell (called)
permissions: {}
on:
workflow_call:
jobs:
test:
name: Pester
permissions:
contents: read
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Run Pester tests
id: test
shell: powershell
run: |
New-Item -ItemType Directory -Path ./build/reports -Force | Out-Null
Import-Module Pester -RequiredVersion 5.9.0 -Force
$config = New-PesterConfiguration
$config.Run.Path = "./tests/scripts"
$config.Run.Exit = $true
$config.Output.Verbosity = "Detailed"
$config.TestResult.Enabled = $true
$config.TestResult.OutputFormat = "JUnitXml"
$config.TestResult.OutputPath = "./build/reports/junit.xml"
$config.CodeCoverage.Enabled = $true
$config.CodeCoverage.Path = @(
Get-ChildItem -Path "./scripts/windows/*.ps1" |
Select-Object -ExpandProperty FullName
)
$config.CodeCoverage.OutputFormat = "Cobertura"
$config.CodeCoverage.OutputPath = "./build/reports/coverage.xml"
Invoke-Pester -Configuration $config
- name: Upload report artifact
if: >-
always() &&
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
with:
name: reports-PowerShell
path: build/reports
if-no-files-found: error