@@ -165,4 +165,57 @@ jobs:
165
165
CLIENT_GUID : ${{secrets.CLIENT_GUID}}
166
166
CLIENT_GUID_SECRET : ${{secrets.CLIENT_GUID_SECRET}}
167
167
shell : pwsh
168
- run : $null = Invoke-Pester .github/scripts/gh-winactions.ps1 -Output Detailed -PassThru
168
+ run : $null = Invoke-Pester .github/scripts/gh-winactions.ps1 -Output Detailed -PassThru
169
+
170
+ macos-tests :
171
+ env :
172
+ SMODefaultModuleName : dbatools
173
+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
174
+ runs-on : macos-latest
175
+
176
+ steps :
177
+ - name : Checkout dbatools repo
178
+ uses : actions/checkout@v3
179
+
180
+ - name : Read dbatools.library version
181
+ id : get-version
182
+ shell : pwsh
183
+ run : |
184
+ $versionConfig = Get-Content '.github/dbatools-library-version.json' | ConvertFrom-Json
185
+ $version = $versionConfig.version
186
+ $isPreview = $version -like "*preview*"
187
+ Write-Output "version=$version" >> $env:GITHUB_OUTPUT
188
+ Write-Output "is_preview=$isPreview" >> $env:GITHUB_OUTPUT
189
+ Write-Output "Using dbatools.library version: $version"
190
+ Write-Output "Is preview version: $isPreview"
191
+
192
+ - name : Install and cache PowerShell modules (stable versions)
193
+ if : steps.get-version.outputs.is_preview == 'False'
194
+ uses :
potatoqualitee/[email protected]
195
+ with :
196
+ modules-to-cache : dbatools.library:${{ steps.get-version.outputs.version }}
197
+
198
+ - name : Install dbatools.library (preview versions)
199
+ if : steps.get-version.outputs.is_preview == 'True'
200
+ shell : pwsh
201
+ run : |
202
+ Write-Output "Preview version detected, bypassing PSModuleCache and using install script"
203
+ ./.github/scripts/install-dbatools-library.ps1
204
+
205
+ - name : 👥 Clone appveyor repo
206
+ working-directory : /tmp
207
+ run : |
208
+ gh repo clone dataplat/appveyor-lab
209
+
210
+ - name : Run macOS tests
211
+ env :
212
+ TENANTID : ${{secrets.TENANTID}}
213
+ CLIENTID : ${{secrets.CLIENTID}}
214
+ CLIENTSECRET : ${{secrets.CLIENTSECRET}}
215
+ CLIENT_GUID : ${{secrets.CLIENT_GUID}}
216
+ CLIENT_GUID_SECRET : ${{secrets.CLIENT_GUID_SECRET}}
217
+ shell : pwsh
218
+ run : |
219
+ $null = Import-Module ./dbatools.psd1 -Force
220
+ $null = Set-DbatoolsInsecureConnection
221
+ $null = Invoke-Pester .github/scripts/gh-macactions.ps1 -Output Detailed -PassThru
0 commit comments