Skip to content

Local Testing

Run local checks from the repository root:

Terminal window
.\scripts\Test-Local.ps1 -ConfigFile .\config.local.yaml

The script:

  • Parses tracked PowerShell script and module files.
  • Validates AzureSqlVmToolkit.psd1.
  • Verifies VERSION matches the module manifest.
  • Parses schemas/config.schema.json.
  • Runs vm_creation_with_bastion.ps1 -Plan.
  • Runs Pester 5 tests when installed.
  • Runs PSScriptAnalyzer when installed.

Install optional local test tooling:

Terminal window
Install-Module -Name powershell-yaml -RequiredVersion 0.4.12 -Scope CurrentUser -Force
Install-Module -Name Pester -RequiredVersion 5.7.1 -Scope CurrentUser -Force -SkipPublisherCheck
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.25.0 -Scope CurrentUser -Force

GitHub Actions runs the same local check for toolkit script/config/test changes, and also runs the docs build plus npm audit.