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
55 changes: 55 additions & 0 deletions .github/workflows/front-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ on:
- 'task/**'
- 'sql_queries/**'
- 'linux_host/**'
- 'avd_host/**'
- 'custom_script_extensions/**'
- 'deploy/bicep/**'
- 'deploy/Update-AvdHostBrokerScript.ps1'
- 'deploy/Enable-HostMonitoring.ps1'
- 'deploy/Post-Provision.ps1'
- 'deploy/Migrate-ExistingEnvironment.ps1'
- 'deploy/Initialize-DeploymentEnvironment.ps1'
- '.github/workflows/front-end-tests.yml'
push:
paths:
Expand All @@ -18,8 +24,14 @@ on:
- 'task/**'
- 'sql_queries/**'
- 'linux_host/**'
- 'avd_host/**'
- 'custom_script_extensions/**'
- 'deploy/bicep/**'
- 'deploy/Update-AvdHostBrokerScript.ps1'
- 'deploy/Enable-HostMonitoring.ps1'
- 'deploy/Post-Provision.ps1'
- 'deploy/Migrate-ExistingEnvironment.ps1'
- 'deploy/Initialize-DeploymentEnvironment.ps1'
- '.github/workflows/front-end-tests.yml'

jobs:
Expand Down Expand Up @@ -198,6 +210,49 @@ jobs:
- name: Run the host script tests
run: bash linux_host/tests/run.sh

avd-scripts:
name: AVD session host scripts
# Connect-LinuxBroker.ps1 runs in Windows PowerShell 5.1 on the session hosts.
runs-on: windows-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- name: Install Pester and PSScriptAnalyzer
shell: powershell
run: |
Install-Module Pester -RequiredVersion 5.7.1 -Force -Scope CurrentUser -SkipPublisherCheck
Install-Module PSScriptAnalyzer -RequiredVersion 1.24.0 -Force -Scope CurrentUser -SkipPublisherCheck

# Also runs Update-AvdHostBrokerScript.ps1, Enable-HostMonitoring.ps1, Post-Provision.ps1's
# call to it, Migrate-ExistingEnvironment.ps1 and the autoscale and monitoring checks of
# Initialize-DeploymentEnvironment.ps1 with Azure mocked.
- name: Run the Pester tests
shell: powershell
run: |
Import-Module Pester -RequiredVersion 5.7.1
$configuration = New-PesterConfiguration
$configuration.Run.Path = 'avd_host/tests'
$configuration.Run.Exit = $true
$configuration.Output.Verbosity = 'Detailed'
Invoke-Pester -Configuration $configuration

- name: Lint the scripts
shell: powershell
run: |
Import-Module PSScriptAnalyzer -RequiredVersion 1.24.0
$findings = @(
'avd_host/broker/Connect-LinuxBroker.ps1',
'deploy/Update-AvdHostBrokerScript.ps1',
'deploy/Enable-HostMonitoring.ps1'
) | ForEach-Object { Invoke-ScriptAnalyzer -Path $_ -Settings avd_host/tests/PSScriptAnalyzerSettings.psd1 }
if (@($findings).Count -gt 0) {
$findings | Format-Table -Property ScriptName, Line, Severity, RuleName, Message -AutoSize -Wrap | Out-String -Width 240 | Write-Output
throw "PSScriptAnalyzer reported $(@($findings).Count) finding(s)."
}

bicep-build:
name: Bicep templates
runs-on: ubuntu-latest
Expand Down
41 changes: 29 additions & 12 deletions README.md

Large diffs are not rendered by default.

37 changes: 30 additions & 7 deletions api/README.md

Large diffs are not rendered by default.

Loading
Loading