Skip to content

Commit

Permalink
Test Windows PowerShell, too
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlbyk committed Mar 26, 2022
1 parent 270d6b5 commit 5f58c7d
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: install dependencies
- name: Install PowerShell Core Dependencies
shell: pwsh
run: |
"Git version: $(git --version)"
Expand All @@ -24,7 +24,8 @@ jobs:
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module Pester -MinimumVersion 5.0.0 -MaximumVersion 5.99.99 -Scope CurrentUser -Force
- name: run tests
"Pester: $(Get-Module Pester | % Version)"
- name: Test PowerShell Core
shell: pwsh
run: |
Import-Module Pester -PassThru
Expand All @@ -34,3 +35,22 @@ jobs:
$Error | Format-List * -Force
exit 1
}
- name: Verify Windows PowerShell Dependencies
if: matrix.os == 'windows-latest'
shell: powershell
run: |
"Git version: $(git --version)"
"PSVersion: $($PSVersionTable.PSVersion)"
"Host name: $($Host.Name)"
"Pester: $(Get-Module Pester | % Version)"
- name: Test Windows PowerShell
if: matrix.os == 'windows-latest'
shell: powershell
run: |
Import-Module Pester -PassThru
$ErrorActionPreference = 'Continue'
$res = Invoke-Pester -Path test -Output Detailed -PassThru -ErrorAction SilentlyContinue
if (!$res -or ($res.FailedCount -gt 0)) {
$Error | Format-List * -Force
exit 1
}

0 comments on commit 5f58c7d

Please sign in to comment.