Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Linting

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
lint:
name: Run PS Script Analyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: lint
uses: devblackops/github-action-psscriptanalyzer@master
with:
failOnErrors: true
failOnWarnings: false
failOnInfos: false
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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