Skip to content

Update README.md

Update README.md #63

# .github/workflows/test-module.yml
name: Test PsLocations Module
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install script analyzer
shell: pwsh
run: |
Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
Import-Module PSScriptAnalyzer
- name: Analyze scripts |
shell: pwsh
run: |
$results = Invoke-ScriptAnalyzer -Path . -Recurse -ExcludeRule PSAvoidUsingWriteHost
if ($results.Count -gt 0) {
Write-Output "Script Analyzer found issues:"
$results | Format-Table
exit 1
}
- name: Run Pester tests
shell: pwsh
run: |
Invoke-Pester -Script PsLocations/tests/PsLocations.tests.ps1 -PassThru -CI