File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 1212
1313jobs :
1414 test :
15- runs-on : windows-latest
15+ runs-on : ${{ matrix.os }}
16+ strategy :
17+ fail-fast : false
18+ matrix :
19+ os : [windows-latest, ubuntu-latest, macos-latest]
20+ psversion : [pwsh, powershell]
21+ exclude :
22+ # PowerShell 5.1 (powershell) is only available on Windows
23+ - os : ubuntu-latest
24+ psversion : powershell
25+ - os : macos-latest
26+ psversion : powershell
27+
28+ name : Test on ${{ matrix.os }} with ${{ matrix.psversion == 'pwsh' && 'PowerShell 7.x' || 'PowerShell 5.1' }}
1629
1730 steps :
1831 - name : Checkout code
1932 uses : actions/checkout@v4
2033
2134 - name : Install required modules
22- shell : pwsh
35+ shell : ${{ matrix.psversion }}
2336 run : |
2437 Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
2538 Install-Module -Name Pester -MinimumVersion 5.0.0 -Force -SkipPublisherCheck
2639 Install-Module -Name PScribo -MinimumVersion 0.11.1 -Force
2740
2841 - name : Run Pester tests
29- shell : pwsh
42+ shell : ${{ matrix.psversion }}
3043 run : |
3144 .\Tests\Invoke-Tests.ps1 -CodeCoverage -OutputFormat NUnitXml
3245
3346 - name : Upload test results
3447 if : always()
3548 uses : actions/upload-artifact@v4
3649 with :
37- name : test-results
50+ name : test-results-${{ matrix.os }}-${{ matrix.psversion }}
3851 path : testResults.xml
3952
4053 - name : Upload code coverage
4154 if : always()
4255 uses : actions/upload-artifact@v4
4356 with :
44- name : code-coverage
57+ name : code-coverage-${{ matrix.os }}-${{ matrix.psversion }}
4558 path : coverage.xml
4659
4760 - name : Upload coverage reports to Codecov
5164 token : ${{ secrets.CODECOV_TOKEN }}
5265 slug : AsBuiltReport/AsBuiltReport.Core
5366 files : ./coverage.xml
54- flags : unittests
67+ flags : unittests-${{ matrix.os }}-${{ matrix.psversion }}
5568 fail_ci_if_error : false
5669
5770 analyze :
You can’t perform that action at this time.
0 commit comments