mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 07:46:57 +00:00
[macOS] Add Ruby toolcache on arm64 images. (#10768)
Co-authored-by: Erik Bershel <erik-bershel@github.com>
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Ruby" -Skip:(-not $os.IsArm64) {
|
||||
Describe "Ruby" {
|
||||
It "Ruby is available" {
|
||||
"ruby --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
@@ -13,10 +11,11 @@ Describe "Ruby" -Skip:(-not $os.IsArm64) {
|
||||
}
|
||||
|
||||
It "Ruby tools are consistent" {
|
||||
$expectedPrefix = "/opt/homebrew"
|
||||
Get-ToolPath "ruby" | Should -Match "$($expectedPrefix)*"
|
||||
Get-ToolPath "gem" | Should -Match "$($expectedPrefix)*"
|
||||
Get-ToolPath "bundler" | Should -Match "$($expectedPrefix)*"
|
||||
$os = Get-OSVersion
|
||||
$expectedPrefix = if ($os.IsArm64) { "/opt/homebrew" } else { "/usr/local" }
|
||||
Get-ToolPath "ruby" | Should -Match "^$expectedPrefix.*"
|
||||
Get-ToolPath "gem" | Should -Match "^$expectedPrefix.*"
|
||||
Get-ToolPath "bundler" | Should -Match "^$expectedPrefix.*"
|
||||
}
|
||||
|
||||
It "Ruby gems permissions are valid" {
|
||||
@@ -1,26 +0,0 @@
|
||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||
Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
|
||||
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Ruby" -Skip:($os.IsArm64) {
|
||||
It "Ruby is available" {
|
||||
"ruby --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Ruby is installed via HomeBrew" {
|
||||
Get-ToolPath "ruby" | Should -Not -BeLike "/usr/bin/ruby*"
|
||||
}
|
||||
|
||||
It "Ruby tools are consistent" {
|
||||
$expectedPrefix = "/usr/local"
|
||||
Get-ToolPath "ruby" | Should -Match "$($expectedPrefix)*"
|
||||
Get-ToolPath "gem" | Should -Match "$($expectedPrefix)*"
|
||||
Get-ToolPath "bundler" | Should -Match "$($expectedPrefix)*"
|
||||
}
|
||||
|
||||
It "Ruby gems permissions are valid" {
|
||||
"gem install bundle" | Should -ReturnZeroExitCode
|
||||
"gem uninstall bundle" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user