If you running the test locally, install folowing modules
Az.Resources is required only for deployment, not for the test itself.
Install-Module Az.Accounts, Az.Resources, Az.Compute, Az.Network, PesterLogin into your Azure environment
Connect-AzAccount -TenantId <your tenantId> -UseDeviceAuthenticationChange context to your Subscription
Set-AzContext -Subscription gabcf-dev-001You can deploy one of the example from Microsoft azure-hub-spoke
For Azure CLI deploymnet see the example README.md
$resourceGroup = New-AzResourceGroup -Name "rg-hub-spoke-dev-001" -Location "westeurope"
New-AzResourceGroupDeployment `
-ResourceGroupName $resourceGroup.ResourceGroupName `
-TemplateUri "https://raw.githubusercontent.com/mspnp/samples/main/solutions/azure-hub-spoke/azuredeploy.json" `
-deployVirtualMachines $true `
-adminUsername "azureadmin" `
-adminPassword (ConvertTo-SecureString -String "Password2023!" -AsPlainText -Force)After deployment succeed you should see multiple Azure Resources in your Resource Group
https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-powershell
