Skip to content

Commit

Permalink
fix path for linux
Browse files Browse the repository at this point in the history
  • Loading branch information
VeryEarly committed Dec 20, 2024
1 parent 2625287 commit 0bbf22b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .azure-pipelines/PipelineSteps/analyze-steps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ param (
# Install PowerShell dependencies
Write-Host -ForegroundColor Green "-------------------- Start installing PowerShell dependencies ... --------------------"
Install-Module "platyPS", "PSScriptAnalyzer" -Repository PSGallery -Force -Confirm:$false -Scope CurrentUser
Write-Host -ForegroundColor DarkGreen "-------------------- End installing PowerShell dependencies ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End installing PowerShell dependencies ... --------------------`n`n`n`n`n"

# Install latest Az modules
Write-Host -ForegroundColor Green "-------------------- Start installing latest Az modules ... --------------------"
New-Item -ItemType Directory -Path "Az-Cmdlets-latest"
Invoke-WebRequest -Uri "https://azpspackage.blob.core.windows.net/release/Az-Cmdlets-latest.tar.gz" -OutFile "Az-Cmdlets-latest/Az-Cmdlets-latest.tar.gz" -MaximumRetryCount 2 -RetryIntervalSec 1
tar -xvzf "Az-Cmdlets-latest/Az-Cmdlets-latest.tar.gz" -C "Az-Cmdlets-latest"
& Az-Cmdlets-latest/InstallModule.ps1
Write-Host -ForegroundColor DarkGreen "-------------------- End installing latest Az modules ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End installing latest Az modules ... --------------------`n`n`n`n`n"

# Generate help
Write-Host -ForegroundColor Green "-------------------- Start generating help ... --------------------"
Expand All @@ -36,9 +36,9 @@ if ($PowerShellPlatform) {
}
$buildProjPath = Join-Path $RepoRoot 'build.proj'
dotnet msbuild $buildProjPath /t:GenerateHelp "/p:Configuration=$Configuration"
Write-Host -ForegroundColor DarkGreen "-------------------- End generating help ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End generating help ... --------------------`n`n`n`n`n"

# Static Analysis
Write-Host -ForegroundColor Green "-------------------- Start static analysis ... --------------------"
dotnet msbuild $buildProjPath /t:StaticAnalysis "/p:Configuration=$Configuration"
Write-Host -ForegroundColor DarkGreen "-------------------- End static analysis ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End static analysis ... --------------------`n`n`n`n`n"
12 changes: 6 additions & 6 deletions .azure-pipelines/PipelineSteps/test-steps.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ param (
Write-Host -ForegroundColor Green "-------------------- Start removing pre-installed Az modules ... --------------------"
$commonUtilityScriptPath = Join-Path $RepoRoot "tools" "TestFx" "Utilities" "CommonUtility.ps1"
& $commonUtilityScriptPath
Write-Host -ForegroundColor DarkGreen "-------------------- End removing pre-installed Az modules ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End removing pre-installed Az modules ... --------------------`n`n`n`n`n"

# Test
Write-Host -ForegroundColor Green "-------------------- Start testing ... --------------------"
Expand All @@ -32,13 +32,13 @@ $preference = $ErrorActionPreference
$ErrorActionPreference = 'Continue'
$buildProjPath = Join-Path $RepoRoot 'build.proj'
dotnet msbuild $buildProjPath /t:Test "/p:Configuration=$Configuration;TestFramework=$TestFramework"
Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End testing ... --------------------`n`n`n`n`n"

# Test AutoGen Modules With PowerShell Core
Write-Host -ForegroundColor Green "-------------------- Start testing AutoGen modules with PowerShell Core ... --------------------"
$executeCIStepScriptPath = Join-Path $RepoRoot "tools" "ExecuteCIStep.ps1"
$currentPath = $PWD
$debugFolderPath = Join-Path $RepoRoot "Artifacts" "Debug"
$debugFolderPath = Join-Path $RepoRoot "artifacts" "Debug"
Set-Location $debugFolderPath

Install-Module -Name Pester -Repository PSGallery -RequiredVersion 4.10.1 -Force
Expand All @@ -52,13 +52,13 @@ $repoArtifact = Join-Path $RepoRoot 'artifacts'

$ErrorActionPreference = $preference
Set-Location $currentPath
Write-Host -ForegroundColor DarkGreen "-------------------- End testing AutoGen modules with PowerShell Core ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End testing AutoGen modules with PowerShell Core ... --------------------`n`n`n`n`n"

# Analyze test coverage
Write-Host -ForegroundColor Green "-------------------- Start analyzing test coverage ... --------------------"
$validateTestCoverageScriptPath = Join-Path $RepoRoot 'tools' 'TestFx' 'Coverage' 'ValidateTestCoverage.ps1'
& $validateTestCoverageScriptPath
Write-Host -ForegroundColor DarkGreen "-------------------- End analyzing test coverage ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End analyzing test coverage ... --------------------`n`n`n`n`n"

# Check test status
Write-Host -ForegroundColor Green "-------------------- Start checking test status ... --------------------"
Expand All @@ -74,4 +74,4 @@ if ($FailedModuleList.Length -ne 0)
}

Set-Location $currentPath
Write-Host -ForegroundColor DarkGreen "-------------------- End checking test status ... --------------------"
Write-Host -ForegroundColor DarkGreen "-------------------- End checking test status ... --------------------`n`n`n`n`n"

0 comments on commit 0bbf22b

Please sign in to comment.