mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 20:56:47 +00:00
* dotnet cmd codeql tests * fixed dotnet tests, added codeql to toolset * changed codeql version to wildcard * removed unused import and a test call * tmp * lowercase file name * removed sourcing invoke-tests Co-authored-by: Leonid Lapshin <originalnoe-nazvanie@yandex.ru>
31 lines
893 B
PowerShell
31 lines
893 B
PowerShell
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
|
|
|
Describe "Dotnet" {
|
|
|
|
BeforeAll {
|
|
$dotnetSDKs = dotnet --list-sdks | ConvertTo-Json
|
|
$dotnetRuntimes = dotnet --list-runtimes | ConvertTo-Json
|
|
}
|
|
|
|
$dotnetVersions = (Get-ToolsetContent).dotnet.versions
|
|
|
|
Context "Default" {
|
|
It "Default Dotnet SDK is available" {
|
|
"dotnet --version" | Should -ReturnZeroExitCode
|
|
}
|
|
}
|
|
|
|
foreach ($version in $dotnetVersions) {
|
|
Context "Dotnet $version" {
|
|
$dotnet = @{ dotnetVersion = $version }
|
|
|
|
It "SDK $version is available" -TestCases $dotnet {
|
|
$dotnetSDKs | Should -Match "$dotnetVersion.[1-9]*"
|
|
}
|
|
|
|
It "Runtime $version is available" -TestCases $dotnet {
|
|
$dotnetRuntimes | Should -Match "$dotnetVersion.[1-9]*"
|
|
}
|
|
}
|
|
}
|
|
} |