77 workflow_dispatch :
88
99jobs :
10- repro :
10+ synthetic :
1111 runs-on : windows-2022
1212 strategy :
1313 fail-fast : false
1414 matrix :
1515 pester : ['5.7.1', '6.0.0-rc1', '6.0.0-rc2', '6.0.0-rc3', '6.0.0-rc4']
16- name : Pester ${{ matrix.pester }}
16+ name : synthetic ${{ matrix.pester }}
1717 steps :
1818 - uses : actions/checkout@v4
1919
@@ -32,14 +32,63 @@ jobs:
3232 if (-not (Test-Path $psd1)) { throw "psd1 not found at $psd1" }
3333 "PESTER_PSD1=$psd1" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
3434
35- - name : Run repro on Windows PowerShell 5.1 (Desktop)
35+ - name : Variants on Windows PowerShell 5.1 (Desktop)
3636 shell : powershell
3737 continue-on-error : true
3838 run : |
39- powershell -NoProfile -ExecutionPolicy Bypass -File .repro2829\run .ps1 -PesterPsd1 "$env:PESTER_PSD1" -Repro ".repro2829\repro.ps1 "
39+ powershell -NoProfile -ExecutionPolicy Bypass -File .repro2829\variants .ps1 -PesterPsd1 "$env:PESTER_PSD1"
4040
41- - name : Run repro on PowerShell 7 (Core)
41+ - name : Variants on PowerShell 7 (Core)
4242 shell : pwsh
4343 continue-on-error : true
4444 run : |
45- pwsh -NoProfile -File .repro2829/run.ps1 -PesterPsd1 "$env:PESTER_PSD1" -Repro ".repro2829/repro.ps1"
45+ pwsh -NoProfile -File .repro2829/variants.ps1 -PesterPsd1 "$env:PESTER_PSD1"
46+
47+ real :
48+ runs-on : windows-2022
49+ strategy :
50+ fail-fast : false
51+ matrix :
52+ pester : ['5.7.1', '6.0.0-rc4']
53+ name : real dbatools ${{ matrix.pester }}
54+ steps :
55+ - uses : actions/checkout@v4
56+
57+ - name : Save Pester ${{ matrix.pester }} and dbatools.library
58+ shell : pwsh
59+ run : |
60+ [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
61+ Get-PackageProvider -Name NuGet -ForceBootstrap | Out-Null
62+
63+ $ver = '${{ matrix.pester }}'
64+ $folder = ($ver -split '-')[0]
65+ $dest = Join-Path $env:RUNNER_TEMP "pmods_$ver"
66+ New-Item -ItemType Directory -Path $dest -Force | Out-Null
67+ $pre = $ver -like '*-*'
68+ Save-Module -Name Pester -RequiredVersion $ver -AllowPrerelease:$pre -Path $dest -Repository PSGallery -Force
69+ $psd1 = Join-Path $dest "Pester\$folder\Pester.psd1"
70+ if (-not (Test-Path $psd1)) { throw "psd1 not found at $psd1" }
71+ "PESTER_PSD1=$psd1" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
72+
73+ $libdest = Join-Path $env:RUNNER_TEMP "libmods"
74+ New-Item -ItemType Directory -Path $libdest -Force | Out-Null
75+ Save-Module -Name dbatools.library -RequiredVersion 2025.12.28 -Path $libdest -Repository PSGallery -Force
76+ "LIBMODS=$libdest" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
77+
78+ - name : Clone dbatools (PR 10405 head, commit 15c3981)
79+ shell : pwsh
80+ run : |
81+ git clone --branch pester-6-rc --depth 1 https://github.com/nohwnd/dbatools.git "$env:RUNNER_TEMP\dbatools_src"
82+ "DBATOOLS_SRC=$env:RUNNER_TEMP\dbatools_src" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
83+
84+ - name : Real negative test on Windows PowerShell 5.1 (Desktop)
85+ shell : powershell
86+ continue-on-error : true
87+ run : |
88+ powershell -NoProfile -ExecutionPolicy Bypass -File .repro2829\real-run.ps1 -PesterPsd1 "$env:PESTER_PSD1" -DbatoolsPath "$env:DBATOOLS_SRC" -LibraryModulePath "$env:LIBMODS"
89+
90+ - name : Real negative test on PowerShell 7 (Core)
91+ shell : pwsh
92+ continue-on-error : true
93+ run : |
94+ pwsh -NoProfile -File .repro2829/real-run.ps1 -PesterPsd1 "$env:PESTER_PSD1" -DbatoolsPath "$env:DBATOOLS_SRC" -LibraryModulePath "$env:LIBMODS"
0 commit comments