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
@@ -24,3 +24,11 @@ sudo "/Library/Application Support/VMware Tools/vmware-resolutionSet" 1176 885
|
||||
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
|
||||
|
||||
# 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
|
||||
|
||||
@@ -37,3 +37,6 @@ sudo rm -rf ~/utils ~/image-generation /tmp/*
|
||||
sudo mdutil -E /
|
||||
sudo log stream | grep -q -E 'mds.*Released.*BackgroundTask' || true
|
||||
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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
# Setup the Cocoapods
|
||||
echo "Installing 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing 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...
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Python Tooling"
|
||||
|
||||
@@ -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...
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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\""
|
||||
}
|
||||
Invoke-PesterTests -TestFile \"$1\" -TestName \"$2\""
|
||||
|
||||
Reference in New Issue
Block a user