2222jobs :
2323 copilot-setup-steps :
2424 name : Setup SqlServerDsc Development Environment
25- runs-on : windows -latest
25+ runs-on : ubuntu -latest
2626
2727 # Set the permissions to the lowest permissions possible needed for your steps.
2828 # Copilot will be given its own token for its operations.
@@ -36,18 +36,32 @@ jobs:
3636 with :
3737 fetch-depth : 0 # Full history needed for GitVersion
3838
39- - name : Setup PowerShell Environment
39+ - name : Configure PowerShell Environment
4040 shell : pwsh
4141 run : |
42- Write-Host "Setting up PowerShell environment..." -ForegroundColor Green
42+ Write-Host "Configure PowerShell environment..." -ForegroundColor Green
4343
4444 # Install dependent PowerShell modules
4545 Install-PSResource -Name 'SqlServer' -Version '21.1.18256' -Scope 'CurrentUser' -Repository 'PSGallery' -TrustRepository
46+ Install-PSResource -Name 'PSDSC' -Scope 'CurrentUser' -Repository 'PSGallery' -TrustRepository
4647
47- # Set execution policy for development
48- Set-ExecutionPolicy -ExecutionPolicy 'RemoteSigned' -Scope 'CurrentUser' -Force
48+ Write-Host "PowerShell environment configuration complete." -ForegroundColor Green
4949
50- Write-Host "PowerShell environment setup complete." -ForegroundColor Green
50+ - name : Install DSCv3
51+ shell : pwsh
52+ run : |
53+ Write-Host "Install DSCv3 in environment..." -ForegroundColor Green
54+
55+ # Install dependent PowerShell modules
56+ Install-DscExe -IncludePrerelease -Force
57+
58+ Write-Host "DSCv3 install complete." -ForegroundColor Green
59+
60+ - name : Verify DSCv3
61+ shell : pwsh
62+ run : |
63+ Write-Host "Running DSCv3 to validate correct operation..." -ForegroundColor Green
64+ dsc --version
5165
5266 - name : Install .NET Tools
5367 shell : pwsh
@@ -115,8 +129,8 @@ jobs:
115129 $commands = Get-Command -Module SqlServerDsc
116130 Write-Host " Exported Commands: $($commands.Count)" -ForegroundColor Cyan
117131
118- $dscResources = Get-DscResource -Module SqlServerDsc
119- Write-Host " DSC Resources: $($dscResources.Count)" -ForegroundColor Cyan
132+ $dscResources = @(dsc resource list --adapter Microsoft.DSC/PowerShell --output-format json | ConvertFrom-Json)
133+ Write-Host " Available class-based DSC Resources: $($dscResources.Count)" -ForegroundColor Cyan
120134 } else {
121135 Write-Error "Failed to import module"
122136 exit 1
0 commit comments