Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
jobs:
copilot-setup-steps:
name: Setup SqlServerDsc Development Environment
runs-on: windows-latest
runs-on: ubuntu-latest

# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
Expand All @@ -36,18 +36,32 @@ jobs:
with:
fetch-depth: 0 # Full history needed for GitVersion

- name: Setup PowerShell Environment
- name: Configure PowerShell Environment
shell: pwsh
run: |
Write-Host "Setting up PowerShell environment..." -ForegroundColor Green
Write-Host "Configure PowerShell environment..." -ForegroundColor Green

# Install dependent PowerShell modules
Install-PSResource -Name 'SqlServer' -Version '21.1.18256' -Scope 'CurrentUser' -Repository 'PSGallery' -TrustRepository
Install-PSResource -Name 'PSDSC' -Scope 'CurrentUser' -Repository 'PSGallery' -TrustRepository

# Set execution policy for development
Set-ExecutionPolicy -ExecutionPolicy 'RemoteSigned' -Scope 'CurrentUser' -Force
Write-Host "PowerShell environment configuration complete." -ForegroundColor Green

Write-Host "PowerShell environment setup complete." -ForegroundColor Green
- name: Install DSCv3
shell: pwsh
run: |
Write-Host "Install DSCv3 in environment..." -ForegroundColor Green

# Install dependent PowerShell modules
Install-DscExe -IncludePrerelease -Force

Write-Host "DSCv3 install complete." -ForegroundColor Green

- name: Verify DSCv3
shell: pwsh
run: |
Write-Host "Running DSCv3 to validate correct operation..." -ForegroundColor Green
dsc --version

- name: Install .NET Tools
shell: pwsh
Expand Down Expand Up @@ -115,8 +129,8 @@ jobs:
$commands = Get-Command -Module SqlServerDsc
Write-Host " Exported Commands: $($commands.Count)" -ForegroundColor Cyan

$dscResources = Get-DscResource -Module SqlServerDsc
Write-Host " DSC Resources: $($dscResources.Count)" -ForegroundColor Cyan
$dscResources = @(dsc resource list --adapter Microsoft.DSC/PowerShell --output-format json | ConvertFrom-Json)
Write-Host " Available class-based DSC Resources: $($dscResources.Count)" -ForegroundColor Cyan
} else {
Write-Error "Failed to import module"
exit 1
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- Added setup workflow for GitHub Copilot.
- Switch the workflow to use Linux.

### Changed

Expand Down
Loading