Skip to content

Add CI pipeline with Github Actions to validate the script #1

Add CI pipeline with Github Actions to validate the script

Add CI pipeline with Github Actions to validate the script #1

Workflow file for this run

name: Unit tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test-pwsh:
defaults:
run:
shell: pwsh
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Run Pester Tests (pwsh)
run: |
Write-Output $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor
Set-PSRepository psgallery -InstallationPolicy trusted
Install-Module -Name Pester -Confirm:$false -Force
Invoke-Pester -Path "./tests" -EnableExit -Show All
test-powershell:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3.1.0
- name: Run Pester Tests (powershell)
shell: powershell
run: |
Write-Output $PSVersionTable.PSVersion.Major $PSVersionTable.PSRemotingProtocolVersion.Minor
Set-PSRepository psgallery -InstallationPolicy trusted
Install-Module -Name Pester -Confirm:$false -Force
Invoke-Pester -Path "./tests" -Show All