File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ jobs :
8+ test :
9+ runs-on : windows-latest
10+ steps :
11+ - uses : actions/checkout@v4
12+
13+ - name : Install Pester + PSScriptAnalyzer
14+ shell : pwsh
15+ run : |
16+ Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
17+ Install-Module Pester -Force -Scope CurrentUser
18+ Install-Module PSScriptAnalyzer -Force -Scope CurrentUser
19+
20+ - name : PSScriptAnalyzer
21+ shell : pwsh
22+ run : |
23+ Invoke-ScriptAnalyzer -Path . -Recurse -Severity Warning,Error
24+
25+ - name : Pester Tests
26+ shell : pwsh
27+ run : |
28+ Invoke-Pester -Path .\Tests -Output Detailed
Original file line number Diff line number Diff line change 1+ $ErrorActionPreference = ' Stop'
2+
3+ Describe " ExchangeOOO-BulkSetter" {
4+ It " script file exists" {
5+ Test-Path " $PSScriptRoot \..\Set-BulkMailboxAutoReply.ps1" | Should - BeTrue
6+ }
7+
8+ It " has CmdletBinding" {
9+ $content = Get-Content " $PSScriptRoot \..\Set-BulkMailboxAutoReply.ps1" - Raw
10+ $content | Should -Match ' \[CmdletBinding'
11+ }
12+ }
You can’t perform that action at this time.
0 commit comments