mirror of
https://github.com/actions/runner-images.git
synced 2025-12-16 14:47:08 +00:00
[MacOS] fix python installation order (#4052)
This commit is contained in:
@@ -1,15 +1,9 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
echo Installing Azure CLI...
|
|
||||||
brew_smart_install "azure-cli"
|
|
||||||
|
|
||||||
echo Installing PowerShell...
|
echo Installing PowerShell...
|
||||||
brew install --cask powershell
|
brew install --cask powershell
|
||||||
|
|
||||||
# A dummy call of `az` to initialize ~/.azure directory before the modules are installed
|
|
||||||
az -v
|
|
||||||
|
|
||||||
# Install PowerShell modules
|
# Install PowerShell modules
|
||||||
psModules=$(get_toolset_value '.powershellModules[].name')
|
psModules=$(get_toolset_value '.powershellModules[].name')
|
||||||
for module in ${psModules[@]}; do
|
for module in ${psModules[@]}; do
|
||||||
@@ -31,7 +25,4 @@ pwsh -command "& {Import-Module Az}"
|
|||||||
# powershell link was removed in powershell-6.0.0-beta9
|
# powershell link was removed in powershell-6.0.0-beta9
|
||||||
sudo ln -s /usr/local/bin/pwsh /usr/local/bin/powershell
|
sudo ln -s /usr/local/bin/pwsh /usr/local/bin/powershell
|
||||||
|
|
||||||
# fix ~/.azure directory permissions
|
|
||||||
sudo chown -R ${USER}: $HOME/.azure
|
|
||||||
|
|
||||||
invoke_tests "Powershell"
|
invoke_tests "Powershell"
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
|
|
||||||
|
Describe "Azure CLI" {
|
||||||
|
It "Azure CLI" {
|
||||||
|
"az -v" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Describe "Carthage" {
|
Describe "Carthage" {
|
||||||
It "Carthage" {
|
It "Carthage" {
|
||||||
"carthage version" | Should -ReturnZeroExitCode
|
"carthage version" | Should -ReturnZeroExitCode
|
||||||
|
|||||||
@@ -40,10 +40,4 @@ Describe "Powershell" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context "Azure CLI" {
|
|
||||||
It "Azure CLI" {
|
|
||||||
"az -v" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -41,4 +41,9 @@ Describe "Python" {
|
|||||||
$python3Path = Split-Path (readlink (which python3))
|
$python3Path = Split-Path (readlink (which python3))
|
||||||
$pip3Path | Should -BeExactly $python3Path
|
$pip3Path | Should -BeExactly $python3Path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "2to3 symlink does not point to Python 2" {
|
||||||
|
$2to3path = (Get-ChildItem (Get-Command 2to3).Path).Target
|
||||||
|
$2to3path | Should -Not -BeLike '/Frameworks/Python.framework/Versions/2.*'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -243,6 +243,7 @@
|
|||||||
"aliyun-cli",
|
"aliyun-cli",
|
||||||
"ant",
|
"ant",
|
||||||
"aria2",
|
"aria2",
|
||||||
|
"azure-cli",
|
||||||
"bats",
|
"bats",
|
||||||
"bazelisk",
|
"bazelisk",
|
||||||
"carthage",
|
"carthage",
|
||||||
|
|||||||
@@ -194,6 +194,7 @@
|
|||||||
"aliyun-cli",
|
"aliyun-cli",
|
||||||
"ant",
|
"ant",
|
||||||
"aria2",
|
"aria2",
|
||||||
|
"azure-cli",
|
||||||
"bats",
|
"bats",
|
||||||
"bazelisk",
|
"bazelisk",
|
||||||
"carthage",
|
"carthage",
|
||||||
|
|||||||
@@ -141,6 +141,7 @@
|
|||||||
"aliyun-cli",
|
"aliyun-cli",
|
||||||
"ant",
|
"ant",
|
||||||
"aria2",
|
"aria2",
|
||||||
|
"azure-cli",
|
||||||
"bazelisk",
|
"bazelisk",
|
||||||
"carthage",
|
"carthage",
|
||||||
"cmake",
|
"cmake",
|
||||||
|
|||||||
Reference in New Issue
Block a user