Skip to content

Add PowerShell CI workflow #1

Add PowerShell CI workflow

Add PowerShell CI workflow #1

Workflow file for this run

name: PowerShell CI
on:
push:
branches: [main]
pull_request:
jobs:
analyze:
name: Analyze PowerShell scripts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install analyzer
shell: pwsh
run: |
Install-Module PSScriptAnalyzer -Scope CurrentUser -Force
- name: Run PSScriptAnalyzer
shell: pwsh
run: |
$results = Invoke-ScriptAnalyzer -Path . -Recurse -Severity Error
$results | Format-Table -AutoSize
if ($results.Count -gt 0) {
exit 1
}