Skip to content

Commit

Permalink
Run Windows PowerShell tests after Pwsh Pester tests for troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
deadlydog committed Apr 20, 2024
1 parent f578dec commit 469afe7
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/build-and-test-powershell-module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ jobs:
shell: pwsh
run: Invoke-ScriptAnalyzer -Path . -Recurse -EnableExit

- name: Run Pester tests on Windows PowerShell to ensure backward compatibility
shell: powershell
- name: Run Pester tests and generate code coverage report
shell: pwsh
run: |
Write-Output "Pester version being used:"
Import-Module -Name Pester
Expand All @@ -120,14 +120,18 @@ jobs:
Run = @{ Throw = $true }
TestResult = @{
Enabled = $true
OutputPath = 'test-results-windows-powershell-nunit.xml'
OutputPath = 'test-results-pwsh-nunit.xml'
}
CodeCoverage = @{
Enabled = $true
OutputPath = 'code-coverage-jacoco.xml'
Path = 'src/' # Only include code coverage for the module's source code, not build or deployment scripts.
}
CodeCoverage = @{ Enabled = $false }
}
Invoke-Pester -Configuration $pesterConfig
- name: Run Pester tests and generate code coverage report
shell: pwsh
- name: Run Pester tests on Windows PowerShell to ensure backward compatibility
shell: powershell
run: |
Write-Output "Pester version being used:"
Import-Module -Name Pester
Expand All @@ -139,13 +143,9 @@ jobs:
Run = @{ Throw = $true }
TestResult = @{
Enabled = $true
OutputPath = 'test-results-pwsh-nunit.xml'
}
CodeCoverage = @{
Enabled = $true
OutputPath = 'code-coverage-jacoco.xml'
Path = 'src/' # Only include code coverage for the module's source code, not build or deployment scripts.
OutputPath = 'test-results-windows-powershell-nunit.xml'
}
CodeCoverage = @{ Enabled = $false }
}
Invoke-Pester -Configuration $pesterConfig
Expand Down

0 comments on commit 469afe7

Please sign in to comment.