mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 22:26:56 +00:00
[Windows] Skip Edge installation for windows-2022 (#4027)
This commit is contained in:
committed by
GitHub
parent
3703015712
commit
19717dd758
@@ -3,7 +3,10 @@
|
||||
## Desc: Install latest stable version of Microsoft Edge browser
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName microsoft-edge
|
||||
# Installed by default on Windows Server 2022
|
||||
if (-not (Test-IsWin22)) {
|
||||
Choco-Install -PackageName microsoft-edge
|
||||
}
|
||||
|
||||
# Install Microsoft Edge WebDriver
|
||||
Write-Host "Install Edge WebDriver..."
|
||||
@@ -24,13 +27,6 @@ $EdgeDriverVersionFile = Start-DownloadWithRetry -Url $EdgeDriverVersionUrl -Nam
|
||||
Write-Host "Download Microsoft Edge WebDriver..."
|
||||
$EdgeDriverLatestVersion = Get-Content -Path $EdgeDriverVersionFile
|
||||
$EdgeDriverArchName = "edgedriver_win64.zip"
|
||||
# A temporary workaround to install the previous driver version because 85.0.564.60 for win64 doesn't exist
|
||||
if ($EdgeDriverLatestVersion -eq "85.0.564.60")
|
||||
{
|
||||
$EdgeDriverLatestVersion = "85.0.564.51"
|
||||
Set-Content -Path $EdgeDriverVersionFile -Value $EdgeDriverLatestVersion
|
||||
}
|
||||
|
||||
$EdgeDriverDownloadUrl = "https://msedgedriver.azureedge.net/${EdgeDriverLatestVersion}/${EdgeDriverArchName}"
|
||||
|
||||
$EdgeDriverArchPath = Start-DownloadWithRetry -Url $EdgeDriverDownloadUrl -Name $EdgeDriverArchName
|
||||
@@ -46,4 +42,4 @@ $PathValue = Get-ItemPropertyValue -Path $regEnvKey -Name 'Path'
|
||||
$PathValue += ";$EdgeDriverPath\"
|
||||
Set-ItemProperty -Path $regEnvKey -Name 'Path' -Value $PathValue
|
||||
|
||||
Invoke-PesterTests -TestFile "Browsers" -TestName "Edge"
|
||||
Invoke-PesterTests -TestFile "Browsers" -TestName "Edge"
|
||||
|
||||
Reference in New Issue
Block a user