mirror of
https://github.com/actions/runner-images.git
synced 2026-01-06 18:19:54 +08:00
[macOS] Pester tests invocation after install - 2. (#2429)
* [macOS] Fail Pester tests on error * return it back * added new tests * added new tests for Macos part2 * fixed nitpicks * vsmac changes * remove toolcache fron high sierra
This commit is contained in:
@@ -166,38 +166,6 @@ Describe "Homebrew" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Rust" -Skip:($os.IsHighSierra) {
|
||||
It "Rustup is installed" {
|
||||
"rustup --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Rustc is installed" {
|
||||
"rustc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo is installed" {
|
||||
"cargo --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
Context "Cargo dependencies" {
|
||||
It "bindgen" {
|
||||
"bindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "cbindgen" {
|
||||
"cbindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo audit" {
|
||||
"cargo audit --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo outdated" {
|
||||
"cargo outdated --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GCC" -Skip:($os.IsHighSierra) {
|
||||
$testCases = @("8", "9", "10") | ForEach-Object { @{Version = $_} }
|
||||
|
||||
@@ -240,15 +208,6 @@ Describe "Newman" -Skip:($os.IsHighSierra -or $os.IsMojave) {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Visual Studio For Mac" {
|
||||
It "VS4Mac is installed" {
|
||||
$vsPath = "/Applications/Visual Studio.app"
|
||||
$vstoolPath = Join-Path $vsPath "Contents/MacOS/vstool"
|
||||
$vsPath | Should -Exist
|
||||
$vstoolPath | Should -Exist
|
||||
}
|
||||
}
|
||||
|
||||
Describe "AWS" {
|
||||
It "AWS CLI" {
|
||||
"aws --version" | Should -ReturnZeroExitCode
|
||||
@@ -314,4 +273,13 @@ Describe "CocoaPods" {
|
||||
It "CocoaPods" {
|
||||
"pod --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "VSMac" {
|
||||
It "VS4Mac is installed" {
|
||||
$vsPath = "/Applications/Visual Studio.app"
|
||||
$vstoolPath = Join-Path $vsPath "Contents/MacOS/vstool"
|
||||
$vsPath | Should -Exist
|
||||
$vstoolPath | Should -Exist
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@ Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1" -DisableNameChecking
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Linters" {
|
||||
Describe "SwiftLint" {
|
||||
It "SwiftLint" -Skip:($os.IsHighSierra) {
|
||||
"swiftlint version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
37
images/macos/tests/Rust.Tests.ps1
Normal file
37
images/macos/tests/Rust.Tests.ps1
Normal file
@@ -0,0 +1,37 @@
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Rust" -Skip:($os.IsHighSierra) {
|
||||
Context "Rust" {
|
||||
It "Rustup is installed" {
|
||||
"rustup --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Rustc is installed" {
|
||||
"rustc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Context "Cargo" {
|
||||
It "Cargo is installed" {
|
||||
"cargo --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Context "Cargo dependencies" {
|
||||
It "bindgen" {
|
||||
"bindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "cbindgen" {
|
||||
"cbindgen --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo audit" {
|
||||
"cargo audit --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cargo outdated" {
|
||||
"cargo outdated --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user