Skip to content

v1.5.1 release

v1.5.1 release #27

Workflow file for this run

name: Pester Tests
permissions:
contents: read
on:
push:
branches: [main, dev, master]
pull_request:
branches: [main, dev, master]
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
psversion: [pwsh, powershell]
exclude:
# PowerShell 5.1 (powershell) is only available on Windows
- os: ubuntu-latest
psversion: powershell
- os: macos-latest
psversion: powershell
name: Test on ${{ matrix.os }} with ${{ matrix.psversion == 'pwsh' && 'PowerShell 7.x' || 'PowerShell 5.1' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install required modules (PowerShell 7.x)
if: matrix.psversion == 'pwsh'
shell: pwsh
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name Pester -MinimumVersion 5.0.0 -Force -SkipPublisherCheck
Install-Module -Name PScribo -MinimumVersion 0.11.1 -Force
- name: Install required modules (PowerShell 5.1)
if: matrix.psversion == 'powershell'
shell: powershell
run: |
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
Install-Module -Name Pester -MinimumVersion 5.0.0 -Force -SkipPublisherCheck
Install-Module -Name PScribo -MinimumVersion 0.11.1 -Force
- name: Run Pester tests (PowerShell 7.x)
if: matrix.psversion == 'pwsh'
shell: pwsh
run: |
.\Tests\Invoke-Tests.ps1 -CodeCoverage -OutputFormat NUnitXml
- name: Run Pester tests (PowerShell 5.1)
if: matrix.psversion == 'powershell'
shell: powershell
run: |
.\Tests\Invoke-Tests.ps1 -CodeCoverage -OutputFormat NUnitXml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}-${{ matrix.psversion }}
path: testResults.xml
- name: Upload code coverage
if: always() && matrix.os == 'windows-latest' && matrix.psversion == 'pwsh'
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: coverage.xml
- name: Upload coverage reports to Codecov
if: always() && matrix.os == 'windows-latest' && matrix.psversion == 'pwsh'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: AsBuiltReport/AsBuiltReport.Core
files: ./coverage.xml
flags: unittests
fail_ci_if_error: false