mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 20:56:47 +00:00
[macOS] Get rid of invoke_tests imports (#2496)
* get rid of invoke_tests imports * add sudo * change path to /usr/bin/invoke_tests * create /usr/local/bin dir * remove local variables * fix group owner * set default 775 perm * delete invoke_tests symlink
This commit is contained in:
committed by
GitHub
parent
8450762c10
commit
caa7a1ac6d
@@ -23,4 +23,12 @@ sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885
|
||||
# sudo security delete-certificate -Z FF6797793A3CD798DC5B2ABEF56F73EDC9F83A64 /Library/Keychains/System.keychain
|
||||
curl https://www.apple.com/certificateauthority/AppleWWDRCAG3.cer --output $HOME/AppleWWDRCAG3.cer --silent
|
||||
sudo security add-trusted-cert -d -r unspecified -k /Library/Keychains/System.keychain $HOME/AppleWWDRCAG3.cer
|
||||
rm $HOME/AppleWWDRCAG3.cer
|
||||
rm $HOME/AppleWWDRCAG3.cer
|
||||
|
||||
# Create symlink for tests running
|
||||
if [ ! -d "/usr/local/bin" ];then
|
||||
sudo mkdir -p -m 775 /usr/local/bin
|
||||
sudo chown $USER:admin /usr/local/bin
|
||||
fi
|
||||
chmod +x $HOME/utils/invoke-tests.sh
|
||||
sudo ln -s $HOME/utils/invoke-tests.sh /usr/local/bin/invoke_tests
|
||||
|
||||
@@ -36,4 +36,7 @@ sudo rm -rf ~/utils ~/image-generation /tmp/*
|
||||
# for now there is no way to get status of indexing process, it takes around 3 minutes to accomplish
|
||||
sudo mdutil -E /
|
||||
sudo log stream | grep -q -E 'mds.*Released.*BackgroundTask' || true
|
||||
echo "Indexing completed"
|
||||
echo "Indexing completed"
|
||||
|
||||
# delete symlink for tests running
|
||||
sudo rm -f /usr/local/bin/invoke_tests
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
function filter_components_by_version {
|
||||
minimumVersion=$1
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "install soundflower"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing aws...
|
||||
AWS_CLI_URL="https://awscli.amazonaws.com/AWSCLIV2.pkg"
|
||||
@@ -15,4 +13,4 @@ brew install aws-sam-cli
|
||||
echo "Install aws cli session manager"
|
||||
brew install --cask session-manager-plugin
|
||||
|
||||
invoke_tests "Common" "AWS"
|
||||
invoke_tests "Common" "AWS"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
|
||||
|
||||
@@ -14,4 +12,4 @@ chmod +x "/usr/local/bin/azcopy"
|
||||
echo "Done, cleaning up"
|
||||
rm -rf azcopy*
|
||||
|
||||
invoke_tests "Common" "AzCopy"
|
||||
invoke_tests "Common" "AzCopy"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing Chrome..."
|
||||
brew_cask_install_ignoring_sha256 "google-chrome"
|
||||
@@ -14,4 +13,4 @@ brew_smart_install "selenium-server-standalone"
|
||||
CHROMEWEBDRIVER_DIR=$(readlink $(which chromedriver) | xargs dirname)
|
||||
echo "export CHROMEWEBDRIVER=$CHROMEWEBDRIVER_DIR" >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Browsers" "Chrome"
|
||||
invoke_tests "Browsers" "Chrome"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# Setup the Cocoapods
|
||||
echo "Installing Cocoapods..."
|
||||
@@ -8,4 +7,4 @@ pod setup
|
||||
# Create a symlink to /usr/local/bin since it was removed due to Homebrew change.
|
||||
ln -sf $(which pod) /usr/local/bin/pod
|
||||
|
||||
invoke_tests "Common" "CocoaPods"
|
||||
invoke_tests "Common" "CocoaPods"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
||||
for package in $common_packages; do
|
||||
@@ -18,4 +17,4 @@ done
|
||||
bazel
|
||||
|
||||
# Invoke tests for all common tools
|
||||
invoke_tests "Common" "CommonUtils"
|
||||
invoke_tests "Common" "CommonUtils"
|
||||
|
||||
@@ -6,9 +6,7 @@
|
||||
# https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||
|
||||
@@ -56,7 +54,6 @@ if [ $(dotnet --list-sdks | wc -l) -lt "1" ]; then
|
||||
fi
|
||||
|
||||
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc"
|
||||
|
||||
echo "Dotnet operations have been completed successfully..."
|
||||
|
||||
invoke_tests "Common" ".NET"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing Microsoft Edge..."
|
||||
brew install --cask microsoft-edge
|
||||
@@ -59,4 +58,4 @@ sudo rm -rf "/Library/Application Support/Microsoft/MAU2.0/"
|
||||
sudo rm -rf "/Library/LaunchAgents/com.microsoft.update.agent.plist"
|
||||
sudo rm -rf "/Library/PrivelegedHelperTools/com.microsoft.autoupdate.helper"
|
||||
|
||||
invoke_tests "Browsers" "Edge"
|
||||
invoke_tests "Browsers" "Edge"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Firefox..."
|
||||
@@ -11,4 +10,4 @@ brew_smart_install "geckodriver"
|
||||
echo "Add GECKOWEBDRIVER to bashrc..."
|
||||
echo "export GECKOWEBDRIVER=$(brew --prefix geckodriver)/bin" >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Browsers" "Firefox"
|
||||
invoke_tests "Browsers" "Firefox"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing GCC@8 using homebrew..."
|
||||
brew_smart_install "gcc@8"
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Git...
|
||||
@@ -33,4 +31,4 @@ git config --global advice.detachedHead false
|
||||
git config --global advice.amWorkDir false
|
||||
git config --global advice.rmHints false
|
||||
|
||||
invoke_tests "Common" "Git"
|
||||
invoke_tests "Common" "Git"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
MINICONDA_INSTALLER="/tmp/miniconda.sh"
|
||||
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
|
||||
@@ -12,4 +11,4 @@ if [ -d "$HOME/.conda" ]; then
|
||||
sudo chown -R $USER "$HOME/.conda"
|
||||
fi
|
||||
|
||||
invoke_tests "Common" "Miniconda"
|
||||
invoke_tests "Common" "Miniconda"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# MongoDB object-value database
|
||||
# installs last version of MongoDB Community Edition
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
node_modules=(
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#
|
||||
###########################################################################
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
||||
@@ -32,4 +31,4 @@ fi
|
||||
|
||||
echo "Node version manager has been installed successfully"
|
||||
|
||||
invoke_tests "Node" "nvm"
|
||||
invoke_tests "Node" "nvm"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
installAzulJDK() {
|
||||
local URL=$1
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Install latest openssl"
|
||||
brew_smart_install "openssl"
|
||||
@@ -11,4 +10,4 @@ brew_smart_install "openssl@1.1"
|
||||
# Symlink brew openssl@1.1 to `/usr/local/bin` as Homebrew refuses
|
||||
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /usr/local/bin/openssl
|
||||
|
||||
invoke_tests "Common" "OpenSSL"
|
||||
invoke_tests "Common" "OpenSSL"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing PHP
|
||||
brew_smart_install "php"
|
||||
@@ -8,4 +7,4 @@ brew_smart_install "php"
|
||||
echo Installing composer
|
||||
brew_smart_install "composer"
|
||||
|
||||
invoke_tests "PHP"
|
||||
invoke_tests "PHP"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
|
||||
@@ -19,4 +18,4 @@ for package in $pipx_packages; do
|
||||
fi
|
||||
done
|
||||
|
||||
invoke_tests "PipxPackages"
|
||||
invoke_tests "PipxPackages"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
#Install latest version of postgresql
|
||||
brew_smart_install "postgres"
|
||||
@@ -27,4 +26,4 @@ done
|
||||
#Stop postgresql
|
||||
brew services stop postgresql
|
||||
|
||||
invoke_tests "Databases" "PostgreSQL"
|
||||
invoke_tests "Databases" "PostgreSQL"
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing Azure CLI...
|
||||
brew_smart_install "azure-cli"
|
||||
@@ -36,4 +34,4 @@ 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,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Python Tooling"
|
||||
@@ -28,4 +27,4 @@ echo "export PIPX_BIN_DIR=${PIPX_BIN_DIR}" >> "${HOME}/.bashrc"
|
||||
echo "export PIPX_HOME=${PIPX_HOME}" >> "${HOME}/.bashrc"
|
||||
echo 'export PATH="$PIPX_BIN_DIR:$PATH"' >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Python"
|
||||
invoke_tests "Python"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Ruby...
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Updating RubyGems...
|
||||
@@ -31,4 +30,4 @@ gem install bundler --force
|
||||
echo Installing fastlane tools...
|
||||
gem install fastlane
|
||||
|
||||
invoke_tests "RubyGem"
|
||||
invoke_tests "RubyGem"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing Rustup...
|
||||
brew_smart_install "rustup-init"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Get the latest Stack version..."
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Install SwiftLint"
|
||||
@@ -8,4 +7,4 @@ download_with_retries $swiftlintUrl "/tmp" "SwiftLint.pkg"
|
||||
sudo installer -pkg /tmp/SwiftLint.pkg -target /
|
||||
rm -rf /tmp/SwiftLint.pkg
|
||||
|
||||
invoke_tests "Linters" "SwiftLint"
|
||||
invoke_tests "Linters" "SwiftLint"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
# Set env variable for vcpkg
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
VSMAC_VERSION=$(get_toolset_value '.xamarin.vsmac')
|
||||
if [ $VSMAC_VERSION == "latest" ]; then
|
||||
@@ -28,4 +27,3 @@ sudo hdiutil detach "$TMPMOUNT"
|
||||
sudo rm -rf "$TMPMOUNT"
|
||||
|
||||
invoke_tests "Common" "VSMac"
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
ANDROID_HOME=$HOME/Library/Android/sdk
|
||||
@@ -64,4 +63,4 @@ echo "Installing ndk r18B..."
|
||||
echo y | $SDKMANAGER "ndk;18.1.5063045"
|
||||
echo "export ANDROID_NDK_18R_PATH=${ANDROID_HOME}/ndk/18.1.5063045" >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "XamarinNDK"
|
||||
invoke_tests "XamarinNDK"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/xamarin-utils.sh
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
invoke_tests() {
|
||||
local TEST_FILE="$1"
|
||||
local TEST_NAME="$2"
|
||||
|
||||
source $HOME/.bashrc
|
||||
pwsh -Command "Import-Module '$HOME/image-generation/helpers/Tests.Helpers.psm1' -DisableNameChecking
|
||||
Invoke-PesterTests -TestFile \"$TEST_FILE\" -TestName \"$TEST_NAME\""
|
||||
}
|
||||
source $HOME/.bashrc
|
||||
pwsh -Command "Import-Module '$HOME/image-generation/helpers/Tests.Helpers.psm1' -DisableNameChecking
|
||||
Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\""
|
||||
|
||||
Reference in New Issue
Block a user