mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 01:03:18 +08:00
[macOS] change Invoke-Pester function (#2261)
* [macOS] change Invoke-Pester function * added new logic * try another approach. * invoke-tests change * added a little bunch of tests. * remove import from browsers * added source for all tests covered scripts. * run all tests. * added proper module import * RunAll-Tests.ps1 changes. * added shebang * added new approach for tests. * the first line should be shebang * fixed nitpicks
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
function filter_components_by_version {
|
||||
minimumVersion=$1
|
||||
@@ -105,3 +106,5 @@ curl -L -o proguard5.tgz $PROGUARD_LOCATION
|
||||
tar xzf proguard5.tgz --strip 1 && rm -f proguard5.tgz
|
||||
cp ../proguard4/proguard-*.txt . # Copy the Proguard Android definitions from the previous version
|
||||
popd
|
||||
|
||||
invoke_tests "Android"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "install soundflower"
|
||||
brew cask install soundflower
|
||||
@@ -12,3 +13,5 @@ brew install sox
|
||||
echo "set Soundflower (2ch) as input/output device"
|
||||
SwitchAudioSource -s "Soundflower (2ch)" -t input
|
||||
SwitchAudioSource -s "Soundflower (2ch)" -t output
|
||||
|
||||
invoke_tests "Common" "Audio Device"
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/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"
|
||||
@@ -13,3 +14,5 @@ brew install aws-sam-cli
|
||||
|
||||
echo "Install aws cli session manager"
|
||||
brew cask install session-manager-plugin
|
||||
|
||||
invoke_tests "Common" "AWS"
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
AZCOPY_DOWNLOAD_URL="https://aka.ms/downloadazcopy-v10-mac"
|
||||
|
||||
@@ -12,3 +13,5 @@ chmod +x "/usr/local/bin/azcopy"
|
||||
|
||||
echo "Done, cleaning up"
|
||||
rm -rf azcopy*
|
||||
|
||||
invoke_tests "Common" "Azcopy"
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing Chrome..."
|
||||
brew_cask_install_ignoring_sha256 "google-chrome"
|
||||
@@ -11,4 +12,6 @@ echo "Installing Selenium"
|
||||
brew install selenium-server-standalone
|
||||
|
||||
CHROMEWEBDRIVER_DIR=$(readlink $(which chromedriver) | xargs dirname)
|
||||
echo "export CHROMEWEBDRIVER=$CHROMEWEBDRIVER_DIR" >> "${HOME}/.bashrc"
|
||||
echo "export CHROMEWEBDRIVER=$CHROMEWEBDRIVER_DIR" >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Browsers" "Chrome"
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing Microsoft Edge..."
|
||||
brew cask install microsoft-edge
|
||||
@@ -58,3 +58,5 @@ sudo rm -rf "$HOME/Library/Caches/com.microsoft.autoupdate2"
|
||||
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"
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo "Installing Firefox..."
|
||||
brew cask install firefox
|
||||
@@ -7,4 +8,6 @@ echo "Installing Geckodriver..."
|
||||
brew install geckodriver
|
||||
|
||||
echo "Add GECKOWEBDRIVER to bashrc..."
|
||||
echo "export GECKOWEBDRIVER=$(brew --prefix geckodriver)/bin" >> "${HOME}/.bashrc"
|
||||
echo "export GECKOWEBDRIVER=$(brew --prefix geckodriver)/bin" >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Browsers" "Firefox"
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing Azure CLI...
|
||||
brew install azure-cli
|
||||
@@ -34,3 +35,5 @@ sudo ln -s /usr/local/bin/pwsh /usr/local/bin/powershell
|
||||
|
||||
# fix ~/.azure directory permissions
|
||||
sudo chown -R ${USER}: $HOME/.azure
|
||||
|
||||
invoke_tests "Powershell"
|
||||
Reference in New Issue
Block a user