Unit Test PowerShell #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |