Skip to content

Merge pull request #33 from EvotecIT/update-parsemessage-to-handle-wi… #22

Merge pull request #33 from EvotecIT/update-parsemessage-to-handle-wi…

Merge pull request #33 from EvotecIT/update-parsemessage-to-handle-wi… #22

name: Test PowerShell Module
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
- 'CHANGELOG.md'
- 'Docs/**'
pull_request:
branches:
- master
env:
DOTNET_VERSION: '8.x'
BUILD_CONFIGURATION: 'Debug'
jobs:
test-windows-ps5:
name: 'Windows PowerShell 5.1'
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install PowerShell modules
shell: powershell
run: |
Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)"
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
- name: Build .NET solution
run: |
dotnet restore Sources/EventViewerX.sln
dotnet build Sources/EventViewerX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore
- name: Run PowerShell tests
shell: powershell
run: .\PSEventViewer.Tests.ps1
test-windows-ps7:
name: 'Windows PowerShell 7'
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install PowerShell modules
shell: pwsh
run: |
Write-Host "PowerShell Version: $($PSVersionTable.PSVersion)"
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
Install-Module -Name PSSharedGoods -Repository PSGallery -Force -SkipPublisherCheck -AllowClobber
- name: Build .NET solution
run: |
dotnet restore Sources/EventViewerX.sln
dotnet build Sources/EventViewerX.sln --configuration ${{ env.BUILD_CONFIGURATION }} --no-restore
- name: Run PowerShell tests
shell: pwsh
run: .\PSEventViewer.Tests.ps1