mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-24 02:18:40 +08:00
* Pester Tests Approach implementation. * changes for netPath
This commit is contained in:
@@ -5,4 +5,10 @@ Describe "MongoDB" {
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
Describe "MySQL" {
|
||||
It "MySQL CLI" {
|
||||
"mysql -V" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
images/win/scripts/Tests/MSYS2.Tests.ps1
Normal file
22
images/win/scripts/Tests/MSYS2.Tests.ps1
Normal file
@@ -0,0 +1,22 @@
|
||||
BeforeAll {
|
||||
$msys2BinDir = "C:\msys64\usr\bin"
|
||||
$msys2mingwDir = "C:\msys64\mingw64\bin"
|
||||
}
|
||||
|
||||
Describe "MSYS2" {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "bash.exe" }
|
||||
@{ ToolName = "tar.exe" }
|
||||
@{ ToolName = "make.exe" }
|
||||
) {
|
||||
Join-Path $msys2BinDir $ToolName | Should -Exist
|
||||
}
|
||||
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "gcc.exe" }
|
||||
@{ ToolName = "cmake.exe" }
|
||||
@{ ToolName = "g++.exe" }
|
||||
) {
|
||||
Join-Path $msys2mingwDir $ToolName | Should -Exist
|
||||
}
|
||||
}
|
||||
14
images/win/scripts/Tests/Miniconda.Tests.ps1
Normal file
14
images/win/scripts/Tests/Miniconda.Tests.ps1
Normal file
@@ -0,0 +1,14 @@
|
||||
Describe "Miniconda" {
|
||||
It "Miniconda Environment variables is set. " {
|
||||
${env:CONDA} | Should -Not -BeNullOrEmpty
|
||||
}
|
||||
|
||||
It "Miniconda $env:CONDA\<PathTest> " -TestCases @(
|
||||
@{ PathTest = "python.exe" }
|
||||
@{ PathTest = "Scripts\conda.exe" }
|
||||
) {
|
||||
$condaPath = Join-Path ${env:CONDA} $PathTest
|
||||
$condaPath | Should -Exist
|
||||
"$condaPath --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
21
images/win/scripts/Tests/Node.Tests.ps1
Normal file
21
images/win/scripts/Tests/Node.Tests.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
Describe "Node.JS" {
|
||||
Context "Basic modules"{
|
||||
It "<ToolName> " -TestCases @(
|
||||
@{ ToolName = "node" }
|
||||
@{ ToolName = "npm" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Context "Global NPM Packages" {
|
||||
It "<ToolName> " -TestCases @(
|
||||
@{ ToolName = "gulp" }
|
||||
@{ ToolName = "grunt" }
|
||||
@{ ToolName = "yarn" }
|
||||
@{ ToolName = "lerna" }
|
||||
@{ ToolName = "newman" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
13
images/win/scripts/Tests/PHP.Tests.ps1
Normal file
13
images/win/scripts/Tests/PHP.Tests.ps1
Normal file
@@ -0,0 +1,13 @@
|
||||
Describe "PHP" {
|
||||
It "Check <ToolName> in the PATH" -TestCases @(
|
||||
@{ ToolName = "php" }
|
||||
@{ ToolName = "composer" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PHP Environment variables is set." {
|
||||
${env:PHPROOT} | Should -Not -BeNullOrEmpty
|
||||
${env:PHPROOT} | Should -Exist
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
Import-Module (Join-Path $PSScriptRoot "..\SoftwareReport\SoftwareReport.Common.psm1") -DisableNameChecking
|
||||
|
||||
Describe "7-Zip" {
|
||||
It "7z" {
|
||||
"7z" | Should -ReturnZeroExitCode
|
||||
@@ -55,16 +57,12 @@ Describe "KubernetesCli" {
|
||||
}
|
||||
|
||||
Describe "Mingw64" {
|
||||
It "gcc" {
|
||||
"gcc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "g++" {
|
||||
"g++ --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "make" {
|
||||
"make --version" | Should -ReturnZeroExitCode
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "gcc" }
|
||||
@{ ToolName = "g++" }
|
||||
@{ ToolName = "make" }
|
||||
) {
|
||||
"$ToolName --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,16 +88,49 @@ Describe "CloudFoundryCli" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GoogleCouldSDK" {
|
||||
It "bq" {
|
||||
"bq version" | Should -ReturnZeroExitCode
|
||||
Describe "GoogleCouldSDK" {
|
||||
It "<ToolName>" -TestCases @(
|
||||
@{ ToolName = "bq" }
|
||||
@{ ToolName = "gcloud" }
|
||||
@{ ToolName = "gsutil" }
|
||||
) {
|
||||
"$ToolName version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
It "gcloud" {
|
||||
"gcloud version" | Should -ReturnZeroExitCode
|
||||
Describe "NET48" {
|
||||
It "NET48" {
|
||||
$netPath = (Get-DotnetFrameworkTools).Path.Split("<")[0]
|
||||
${netPath} + "4.8 Tools" | Should -Exist
|
||||
}
|
||||
}
|
||||
|
||||
It "gsutil" {
|
||||
"gsutil version" | Should -ReturnZeroExitCode
|
||||
Describe "NSIS" {
|
||||
It "NSIS" {
|
||||
"makensis /VERSION" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Nuget" {
|
||||
It "Nuget" {
|
||||
"nuget" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "OpenSSL" {
|
||||
It "OpenSSL" {
|
||||
"openssl version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Packer" {
|
||||
It "Packer" {
|
||||
"packer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Perl" {
|
||||
It "Perl" {
|
||||
"perl --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user