Update README.md #63
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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 |