Skip to content

Commit

Permalink
Fix workflow variables
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronparker committed Dec 4, 2023
1 parent fbc1dad commit 90be801
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
27 changes: 2 additions & 25 deletions .github/workflows/test-avd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,6 @@ on:
- cron: '0 1 15 * *' #Run on the 15th of each month

jobs:
# pssa:
# permissions:
# contents: read # for actions/checkout to fetch code
# security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
# actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
# name: PSScriptAnalyzer
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

# - name: Run PSScriptAnalyzer
# uses: microsoft/psscriptanalyzer-action@6b2948b1944407914a58661c49941824d149734f
# with:
# path: "./scripts"
# recurse: true
# output: results.sarif

# # Upload the SARIF file generated in the previous step
# - name: Upload SARIF results file
# uses: github/codeql-action/upload-sarif@v2
# with:
# sarif_file: results.sarif

test:
name: Run tests
#needs: pssa
Expand All @@ -56,8 +33,8 @@ jobs:
if: always()
working-directory: "${{ github.workspace }}"
run: |
$AzureRegionName = ${env:AZUREREGIONNAME}
$SecureVars = ${env:SECUREVARS} | ConvertFrom-Json
$AzureRegionName = ${{ secrets.AZUREREGIONNAME }}
$SecureVars = ${{ secrets.SECUREVARS }} | ConvertFrom-Json
Import-Module -Name "Pester" -Force -ErrorAction "Stop"
$Config = New-PesterConfiguration
$Config.Run.Path = "$Env:GITHUB_WORKSPACE\tests\scripts"
Expand Down
3 changes: 2 additions & 1 deletion tests/scripts/3_RunImageScripts.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ BeforeDiscovery {

# Get the scripts to test
$SupportScripts = Get-ChildItem -Path $Path -Include "0*.ps1" -Recurse -Exclude "012_WindowsUpdate.ps1"
$DependencyScripts = Get-ChildItem -Path $Path -Include "1*.ps1" -Recurse -Exclude "101_Avd-Agents.ps1"
$DependencyScripts = Get-ChildItem -Path $Path -Include "1*.ps1" -Recurse
$MicrosoftAppsScripts = Get-ChildItem -Path $Path -Include "2*.ps1" -Recurse
$3rdPartyScripts = Get-ChildItem -Path $Path -Include "4*.ps1" -Recurse
$CleanupScripts = Get-ChildItem -Path $Path -Include "9*.ps1" -Recurse

# Get scripts to run a 2nd time
$2ndRunScripts = Get-ChildItem -Path $Path -Include "201_MicrosoftTeams.ps1" -Recurse
}

Expand Down

0 comments on commit 90be801

Please sign in to comment.