Closed Manbearpiet closed 1 year ago
We use something like this:
name: Tests
on: [pull_request]
jobs:
test:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- name: Test
shell: pwsh
run: |
$config = New-PesterConfiguration -Hashtable @{TestResult = @{Enabled = $true }; Run = @{Exit = $false }; Output = @{ Verbosity = 'Detailed' }}
Invoke-Pester -Configuration $config
This just doesn't account for Windows PowerShell, which runs with shell: powershell
Fixed in #21
Windows PowerShell adds quite some test time and makes the code a bit more complex.
Summary of the new feature / enhancement
As a user It would be great if we could have tests done on each platform So that the module becomes more reliable cross-platform
Proposed technical implementation details (optional)
We could use a matrix strategy to test on all supported OS's. Which would run on each pull request
Something borrowing logic from: https://github.com/devblackops/Stucco/blob/main/Stucco/template/cicd/github-actions.yml
We should not forget to test for both pwsh and PowerShell to prevent #18 it's scenario.