Skip to content

Unit Test PowerShell #4

Unit Test PowerShell

Unit Test PowerShell #4

# Purpose: Run unit tests for PowerShell
name: Unit Test PowerShell
# This is a reusable workflow called by the pipeline.
on:
workflow_call:
workflow_dispatch:
permissions: read-all
jobs:
powershell-tests:
name: PowerShell Unit Tests
runs-on: windows-latest
# This condition prevents duplicate runs.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Run Pester Tests
if: ${{ !cancelled() }}
shell: powershell
run: |
Invoke-Pester -Output 'Detailed' -Path 'PowerShell/ScubaGear/Testing/Unit/PowerShell'