File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -31,15 +31,31 @@ jobs:
3131 - name : Checkout code
3232 uses : actions/checkout@v4
3333
34- - name : Install required modules
35- shell : ${{ matrix.psversion }}
34+ - name : Install required modules (PowerShell 7.x)
35+ if : matrix.psversion == 'pwsh'
36+ shell : pwsh
37+ run : |
38+ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
39+ Install-Module -Name Pester -MinimumVersion 5.0.0 -Force -SkipPublisherCheck
40+ Install-Module -Name PScribo -MinimumVersion 0.11.1 -Force
41+
42+ - name : Install required modules (PowerShell 5.1)
43+ if : matrix.psversion == 'powershell'
44+ shell : powershell
3645 run : |
3746 Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
3847 Install-Module -Name Pester -MinimumVersion 5.0.0 -Force -SkipPublisherCheck
3948 Install-Module -Name PScribo -MinimumVersion 0.11.1 -Force
4049
41- - name : Run Pester tests
42- shell : ${{ matrix.psversion }}
50+ - name : Run Pester tests (PowerShell 7.x)
51+ if : matrix.psversion == 'pwsh'
52+ shell : pwsh
53+ run : |
54+ .\Tests\Invoke-Tests.ps1 -CodeCoverage -OutputFormat NUnitXml
55+
56+ - name : Run Pester tests (PowerShell 5.1)
57+ if : matrix.psversion == 'powershell'
58+ shell : powershell
4359 run : |
4460 .\Tests\Invoke-Tests.ps1 -CodeCoverage -OutputFormat NUnitXml
4561
You can’t perform that action at this time.
0 commit comments