mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 17:18:52 +08:00
Merge branch 'main' of https://github.com/actions/virtual-environments into main
This commit is contained in:
@@ -2,16 +2,27 @@ Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Android
|
||||
|
||||
Describe "Android SDK" {
|
||||
$androidToolset = (Get-ToolsetContent).android
|
||||
$androidPackages = Get-AndroidPackages -AndroidSDKManagerPath (Get-AndroidSDKManagerPath)
|
||||
$androidInstalledPackages = Get-AndroidInstalledPackages
|
||||
|
||||
$platformTestCases = @()
|
||||
$platformList = $androidToolset.platform_list
|
||||
[int]$platformMinVersion = $androidToolset.platform_min_version
|
||||
$platformList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages `
|
||||
-PrefixPackageName "platforms;" `
|
||||
-MinimumVersion $platformMinVersion `
|
||||
-Delimiter "-" `
|
||||
-Index 1
|
||||
$platformList | ForEach-Object {
|
||||
$platformTestCases += @{ platformVersion = $_; installedPackages = $androidInstalledPackages }
|
||||
}
|
||||
|
||||
$buildToolsTestCases = @()
|
||||
$buildToolsList = $androidToolset.build_tools
|
||||
[version]$buildToolsMinVersion = $androidToolset.build_tools_min_version
|
||||
$buildToolsList = Get-AndroidPackagesByVersion -AndroidPackages $androidPackages `
|
||||
-PrefixPackageName "build-tools;" `
|
||||
-MinimumVersion $buildToolsMinVersion `
|
||||
-Delimiter ";" `
|
||||
-Index 1
|
||||
$buildToolsList | ForEach-Object {
|
||||
$buildToolsTestCases += @{ buildToolsVersion = $_; installedPackages = $androidInstalledPackages }
|
||||
}
|
||||
@@ -35,14 +46,14 @@ Describe "Android SDK" {
|
||||
}
|
||||
|
||||
It "Platform version <platformVersion> is installed" -TestCases $platformTestCases {
|
||||
"$installedPackages" | Should -Match "platforms;$platformVersion"
|
||||
"$installedPackages" | Should -Match "$platformVersion"
|
||||
}
|
||||
|
||||
It "Platform build tools <buildToolsVersion> is installed" -TestCases $buildToolsTestCases {
|
||||
"$installedPackages" | Should -Match "build-tools;$buildToolsVersion"
|
||||
"$installedPackages" | Should -Match "$buildToolsVersion"
|
||||
}
|
||||
|
||||
if (Test-isWin19) {
|
||||
if (Test-IsWin19) {
|
||||
It "Extra package <extraPackage> is installed" -TestCases $extraPackagesTestCases {
|
||||
"$installedPackages" | Should -Match "extras;$extraPackage"
|
||||
}
|
||||
|
||||
@@ -3,12 +3,18 @@ Describe "Haskell" {
|
||||
[array]$ghcVersionList = Get-ChildItem -Path $chocoPackagesPath -Filter "ghc.*" | ForEach-Object { $_.Name.TrimStart("ghc.") }
|
||||
$ghcCount = $ghcVersionList.Count
|
||||
$defaultGhcVersion = $ghcVersionList | Sort-Object {[Version]$_} | Select-Object -Last 1
|
||||
$ghcDefaultCases = @{
|
||||
defaultGhcVersion = $defaultGhcVersion
|
||||
defaultGhcShortVersion = ([version]$defaultGhcVersion).ToString(3)
|
||||
}
|
||||
|
||||
$ghcTestCases = $ghcVersionList | ForEach-Object {
|
||||
$ghcVersion = $_
|
||||
$ghcShortVersion = ([version]$ghcVersion).ToString(3)
|
||||
@{
|
||||
ghcVersion = $ghcVersion
|
||||
binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcVersion\bin\ghc.exe"
|
||||
ghcShortVersion = $ghcShortVersion
|
||||
binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,11 +23,11 @@ Describe "Haskell" {
|
||||
}
|
||||
|
||||
It "GHC <ghcVersion> is installed" -TestCases $ghcTestCases {
|
||||
"$binGhcPath --version" | Should -MatchCommandOutput $ghcVersion
|
||||
"$binGhcPath --version" | Should -MatchCommandOutput $ghcShortVersion
|
||||
}
|
||||
|
||||
It "GHC <defaultGhcVersion> is the default version and should be the latest installed" -TestCases @{defaultGhcVersion = $defaultGhcVersion} {
|
||||
"ghc --version" | Should -MatchCommandOutput $defaultGhcVersion
|
||||
It "GHC <defaultGhcVersion> is the default version and should be the latest installed" -TestCases $ghcDefaultCases {
|
||||
"ghc --version" | Should -MatchCommandOutput $defaultGhcShortVersion
|
||||
}
|
||||
|
||||
It "Cabal is installed" {
|
||||
|
||||
Reference in New Issue
Block a user