mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
[macOS] add pester tests to install scripts part-1. (#2286)
* [macOS] add pester tests to install scripts part-1. * changed version * added changes related to common utils installation * added source tests file * removed tests from homebrew * moved jq to homebrew * fix nitpicks * incorrect things are fixed. * fixed some mistakes in the text * commonutils changed. * remove swiftlint installation from toolsets * removed useless string
This commit is contained in:
@@ -106,7 +106,7 @@ function Invoke-PesterTests {
|
|||||||
$configuration.Filter.FullName = $TestName
|
$configuration.Filter.FullName = $TestName
|
||||||
}
|
}
|
||||||
|
|
||||||
# Switch ErrorActionPreference to Stop temporary to make sure that tests will on silent errors too
|
# Switch ErrorActionPreference to make sure that tests will fail on silent errors too
|
||||||
$backupErrorActionPreference = $ErrorActionPreference
|
$backupErrorActionPreference = $ErrorActionPreference
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
$results = Invoke-Pester -Configuration $configuration
|
$results = Invoke-Pester -Configuration $configuration
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
|
# Setup the Cocoapods
|
||||||
echo "Installing Cocoapods..."
|
echo "Installing Cocoapods..."
|
||||||
|
|
||||||
# Setup the Cocoapods master repo
|
|
||||||
echo Setting up the Cocoapods master repository...
|
|
||||||
pod setup
|
pod setup
|
||||||
|
|
||||||
# Create a symlink to /usr/local/bin since it was removed due to Homebrew change.
|
# Create a symlink to /usr/local/bin since it was removed due to Homebrew change.
|
||||||
ln -sf $(which pod) /usr/local/bin/pod
|
ln -sf $(which pod) /usr/local/bin/pod
|
||||||
|
|
||||||
|
invoke_tests "Common" "CocoaPods"
|
||||||
@@ -1,60 +1,21 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
# TO-DO: Move the list of brew packages and casks to toolset
|
common_packages=$(get_toolset_value '.brew.common_packages[]')
|
||||||
|
for package in $common_packages; do
|
||||||
# brew install
|
echo "Installing $package..."
|
||||||
binst_common_utils=(
|
|
||||||
carthage
|
|
||||||
cmake
|
|
||||||
subversion
|
|
||||||
go
|
|
||||||
gnupg
|
|
||||||
llvm
|
|
||||||
libpq
|
|
||||||
zstd
|
|
||||||
packer
|
|
||||||
helm
|
|
||||||
aliyun-cli
|
|
||||||
bazelisk
|
|
||||||
gh
|
|
||||||
p7zip
|
|
||||||
ant
|
|
||||||
aria2
|
|
||||||
gnu-tar
|
|
||||||
)
|
|
||||||
|
|
||||||
if is_Less_BigSur; then
|
|
||||||
binst_common_utils+=(
|
|
||||||
xctool
|
|
||||||
bats
|
|
||||||
parallel
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
for package in ${binst_common_utils[@]}; do
|
|
||||||
echo "Install $package"
|
|
||||||
brew install $package
|
brew install $package
|
||||||
done
|
done
|
||||||
|
|
||||||
# brew cask install
|
cask_packages=$(get_toolset_value '.brew.cask_packages[]')
|
||||||
bcask_common_utils=(
|
for package in $cask_packages; do
|
||||||
julia
|
echo "Installing $package..."
|
||||||
)
|
|
||||||
|
|
||||||
if is_Less_BigSur; then
|
|
||||||
bcask_common_utils+=(
|
|
||||||
virtualbox
|
|
||||||
vagrant
|
|
||||||
r
|
|
||||||
)
|
|
||||||
fi
|
|
||||||
|
|
||||||
for package in ${bcask_common_utils[@]}; do
|
|
||||||
echo "Install $package"
|
|
||||||
brew install --cask $package
|
brew install --cask $package
|
||||||
done
|
done
|
||||||
|
|
||||||
# Invoke bazel to download the latest bazel version via bazelisk
|
# Invoke bazel to download the latest bazel version via bazelisk
|
||||||
bazel
|
bazel
|
||||||
|
|
||||||
|
# Invoke tests for all common tools
|
||||||
|
invoke_tests "Common" "CommonUtils"
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
|
||||||
@@ -57,3 +58,5 @@ fi
|
|||||||
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc"
|
echo 'export PATH="$PATH:$HOME/.dotnet/tools"' >> "$HOME/.bashrc"
|
||||||
|
|
||||||
echo "Dotnet operations have been completed successfully..."
|
echo "Dotnet operations have been completed successfully..."
|
||||||
|
|
||||||
|
invoke_tests "Common" ".NET"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
echo "Installing GCC@8 using homebrew..."
|
echo "Installing GCC@8 using homebrew..."
|
||||||
brew install gcc@8
|
brew install gcc@8
|
||||||
@@ -9,4 +10,6 @@ brew install gcc@9
|
|||||||
# https://github.com/actions/virtual-environments/issues/1280
|
# https://github.com/actions/virtual-environments/issues/1280
|
||||||
echo "Installing GCC@10 using homebrew..."
|
echo "Installing GCC@10 using homebrew..."
|
||||||
brew install gcc@10
|
brew install gcc@10
|
||||||
rm $(which gfortran)
|
rm $(which gfortran)
|
||||||
|
|
||||||
|
invoke_tests "Common" "GCC"
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
echo Installing Git...
|
echo Installing Git...
|
||||||
brew install git
|
brew install git
|
||||||
@@ -27,4 +28,6 @@ git config --global advice.resolveConflict false
|
|||||||
git config --global advice.implicitIdentity false
|
git config --global advice.implicitIdentity false
|
||||||
git config --global advice.detachedHead false
|
git config --global advice.detachedHead false
|
||||||
git config --global advice.amWorkDir false
|
git config --global advice.amWorkDir false
|
||||||
git config --global advice.rmHints false
|
git config --global advice.rmHints false
|
||||||
|
|
||||||
|
invoke_tests "Common" "Git"
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
|
||||||
export PATH="$HOME/.ghcup/bin:$PATH"
|
export PATH="$HOME/.ghcup/bin:$PATH"
|
||||||
@@ -18,3 +19,5 @@ done
|
|||||||
|
|
||||||
echo "install cabal..."
|
echo "install cabal..."
|
||||||
ghcup install-cabal
|
ghcup install-cabal
|
||||||
|
|
||||||
|
invoke_tests "Common" "Haskell"
|
||||||
|
|||||||
@@ -7,14 +7,15 @@ HOMEBREW_INSTALL_URL="https://raw.githubusercontent.com/Homebrew/install/master/
|
|||||||
echo "Disabling Homebrew analytics..."
|
echo "Disabling Homebrew analytics..."
|
||||||
brew analytics off
|
brew analytics off
|
||||||
|
|
||||||
echo "Installing the latest curl..."
|
# jq is required for further installation scripts
|
||||||
|
echo "Installing jq..."
|
||||||
|
brew install jq
|
||||||
|
|
||||||
|
echo "Installing curl..."
|
||||||
brew install curl
|
brew install curl
|
||||||
|
|
||||||
echo "Installing wget..."
|
echo "Installing wget..."
|
||||||
brew install wget
|
brew install wget
|
||||||
|
|
||||||
echo "Installing jq..."
|
|
||||||
brew install jq
|
|
||||||
|
|
||||||
# init brew bundle feature
|
# init brew bundle feature
|
||||||
brew tap Homebrew/bundle
|
brew tap Homebrew/bundle
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
MINICONDA_INSTALLER="/tmp/miniconda.sh"
|
MINICONDA_INSTALLER="/tmp/miniconda.sh"
|
||||||
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
|
curl -sL https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o $MINICONDA_INSTALLER
|
||||||
@@ -9,4 +10,6 @@ sudo ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda
|
|||||||
|
|
||||||
if [ -d "$HOME/.conda" ]; then
|
if [ -d "$HOME/.conda" ]; then
|
||||||
sudo chown -R $USER "$HOME/.conda"
|
sudo chown -R $USER "$HOME/.conda"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
invoke_tests "Common" "Miniconda"
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
# MongoDB object-value database
|
# MongoDB object-value database
|
||||||
# installs last version of MongoDB Community Edition
|
# installs last version of MongoDB Community Edition
|
||||||
@@ -7,4 +8,6 @@
|
|||||||
echo "Installing mongodb..."
|
echo "Installing mongodb..."
|
||||||
|
|
||||||
brew tap mongodb/brew
|
brew tap mongodb/brew
|
||||||
brew install mongodb-community
|
brew install mongodb-community
|
||||||
|
|
||||||
|
invoke_tests "Common" "Mongo"
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
|
||||||
node_modules=(
|
node_modules=(
|
||||||
@@ -43,3 +43,5 @@ if is_Less_BigSur; then
|
|||||||
echo "Install node-gyp"
|
echo "Install node-gyp"
|
||||||
npm install -g node-gyp
|
npm install -g node-gyp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
invoke_tests "Node" "Node.js"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#
|
#
|
||||||
###########################################################################
|
###########################################################################
|
||||||
source ~/utils/utils.sh
|
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')
|
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
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
|
||||||
@@ -30,3 +31,5 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Node version manager has been installed successfully"
|
echo "Node version manager has been installed successfully"
|
||||||
|
|
||||||
|
invoke_tests "Node" "nvm"
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
installAzulJDK() {
|
installAzulJDK() {
|
||||||
local URL=$1
|
local URL=$1
|
||||||
@@ -48,4 +49,6 @@ echo Installing Maven...
|
|||||||
brew install maven
|
brew install maven
|
||||||
|
|
||||||
echo Installing Gradle ...
|
echo Installing Gradle ...
|
||||||
brew install gradle
|
brew install gradle
|
||||||
|
|
||||||
|
invoke_tests "Java"
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -e -o pipefail
|
#!/bin/bash -e -o pipefail
|
||||||
|
|
||||||
source ~/utils/utils.sh
|
source ~/utils/utils.sh
|
||||||
|
source ~/utils/invoke-tests.sh
|
||||||
|
|
||||||
echo "Install latest openssl"
|
echo "Install latest openssl"
|
||||||
brew install openssl
|
brew install openssl
|
||||||
@@ -10,3 +10,5 @@ brew install openssl@1.1
|
|||||||
|
|
||||||
# Symlink brew openssl@1.1 to `/usr/local/bin` as Homebrew refuses
|
# 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
|
ln -sf $(brew --prefix openssl@1.1)/bin/openssl /usr/local/bin/openssl
|
||||||
|
|
||||||
|
invoke_tests "Common" "OpenSSL"
|
||||||
@@ -48,19 +48,128 @@ Describe "Audio device" -Skip:($os.IsHighSierra -or $os.IsBigSur) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Common utilities" {
|
Describe "CommonUtils" {
|
||||||
It "Homebrew" {
|
It "Carthage" {
|
||||||
"brew --version" | Should -ReturnZeroExitCode
|
"carthage version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "DotNet" {
|
It "cmake" {
|
||||||
"dotnet --version" | Should -ReturnZeroExitCode
|
"cmake --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Subversion" {
|
||||||
|
"svn --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Go" {
|
It "Go" {
|
||||||
"go version" | Should -ReturnZeroExitCode
|
"go version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It "GnuPG" {
|
||||||
|
"gpg --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Clang/LLVM is installed" {
|
||||||
|
"$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "zstd" {
|
||||||
|
"zstd --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Packer" {
|
||||||
|
"packer --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Helm" {
|
||||||
|
"helm version --short" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "bazelisk" {
|
||||||
|
"bazelisk version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "GitHub CLI" {
|
||||||
|
"gh --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "7-Zip" {
|
||||||
|
"7z i" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Apache Ant" {
|
||||||
|
"ant -version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Aria2" {
|
||||||
|
"aria2c --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "GNU Tar" {
|
||||||
|
"gtar --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "bazel" {
|
||||||
|
"bazel --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Aliyun CLI" {
|
||||||
|
"aliyun --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "Julia" {
|
||||||
|
"julia --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "virtualbox" -Skip:($os.IsBigSur) {
|
||||||
|
"vboxmanage -v" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "jq" {
|
||||||
|
"jq --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "curl" {
|
||||||
|
"curl --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "wget" {
|
||||||
|
"wget --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "vagrant" -Skip:($os.IsBigSur) {
|
||||||
|
"vagrant --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "xctool" -Skip:($os.IsBigSur) {
|
||||||
|
"xctool --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
|
||||||
|
It "R" -Skip:($os.IsBigSur) {
|
||||||
|
"R --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe ".NET" {
|
||||||
|
It ".NET" {
|
||||||
|
"dotnet --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "CocoaPods" {
|
||||||
|
It "CocoaPods" {
|
||||||
|
"pod --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Homebrew" {
|
||||||
|
It "Homebrew" {
|
||||||
|
"brew --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Describe "Common utilities" {
|
||||||
|
|
||||||
It "Bundler" {
|
It "Bundler" {
|
||||||
"bundler --version" | Should -ReturnZeroExitCode
|
"bundler --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
@@ -69,14 +178,6 @@ Describe "Common utilities" {
|
|||||||
"mvn --version" | Should -ReturnZeroExitCode
|
"mvn --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "CocoaPods" {
|
|
||||||
"pod --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Carthage" {
|
|
||||||
"carthage version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "App Center CLI" {
|
It "App Center CLI" {
|
||||||
"appcenter --version" | Should -ReturnZeroExitCode
|
"appcenter --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
@@ -98,10 +199,6 @@ Describe "Common utilities" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Aliyun CLI" {
|
|
||||||
"aliyun --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
Context "Nomad" -Skip:($os.IsBigSur) {
|
Context "Nomad" -Skip:($os.IsBigSur) {
|
||||||
It "Nomad CLI" {
|
It "Nomad CLI" {
|
||||||
$result = Get-CommandResult "gem list"
|
$result = Get-CommandResult "gem list"
|
||||||
@@ -112,51 +209,30 @@ Describe "Common utilities" {
|
|||||||
"ipa --version" | Should -ReturnZeroExitCode
|
"ipa --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Describe "Miniconda" {
|
||||||
It "Conda" {
|
It "Conda" {
|
||||||
Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty
|
Get-EnvironmentVariable "CONDA" | Should -Not -BeNullOrEmpty
|
||||||
$condaBinPath = Join-Path $env:CONDA "bin" "conda"
|
$condaBinPath = Join-Path $env:CONDA "bin" "conda"
|
||||||
"$condaBinPath --version" | Should -ReturnZeroExitCode
|
"$condaBinPath --version" | Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Fastlane" {
|
It "Fastlane" {
|
||||||
"fastlane --version" | Should -ReturnZeroExitCode
|
"fastlane --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Subversion" {
|
|
||||||
"svn --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "cmake" {
|
|
||||||
"cmake --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "curl" {
|
|
||||||
"curl --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "xctool" -Skip:($os.IsBigSur) {
|
|
||||||
"xctool --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "xcpretty" {
|
It "xcpretty" {
|
||||||
"xcpretty --version" | Should -ReturnZeroExitCode
|
"xcpretty --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "wget" {
|
Describe "Mongo" {
|
||||||
"wget --version" | Should -ReturnZeroExitCode
|
It "mongodb" {
|
||||||
|
"mongo --version" | Should -ReturnZeroExitCode
|
||||||
|
"mongod --version"| Should -ReturnZeroExitCode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
It "mongodb" {
|
Describe "OpenSSL" {
|
||||||
"mongo --version" | Should -ReturnZeroExitCode
|
|
||||||
"mongod --version"| Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "jq" {
|
|
||||||
"jq --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
Context "OpenSSL" {
|
|
||||||
It "OpenSSL is available" {
|
It "OpenSSL is available" {
|
||||||
"openssl version" | Should -ReturnZeroExitCode
|
"openssl version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
@@ -172,10 +248,6 @@ Describe "Common utilities" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
It "GnuPG" {
|
|
||||||
"gpg --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "PostgreSQL-Client" {
|
It "PostgreSQL-Client" {
|
||||||
"psql --version" | Should -ReturnZeroExitCode
|
"psql --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
@@ -184,10 +256,6 @@ Describe "Common utilities" {
|
|||||||
"pg_config --version" | Should -ReturnZeroExitCode
|
"pg_config --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Aria2" {
|
|
||||||
"aria2c --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Azcopy" {
|
It "Azcopy" {
|
||||||
"azcopy --version" | Should -ReturnZeroExitCode
|
"azcopy --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
@@ -200,58 +268,6 @@ Describe "Common utilities" {
|
|||||||
It "Composer" {
|
It "Composer" {
|
||||||
"composer --version" | Should -ReturnZeroExitCode
|
"composer --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "R" -Skip:($os.IsBigSur) {
|
|
||||||
"R --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "zstd" {
|
|
||||||
"zstd --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "bazel" {
|
|
||||||
"bazel --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "bazelisk" {
|
|
||||||
"bazelisk version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Julia" {
|
|
||||||
"julia --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Packer" {
|
|
||||||
"packer --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Helm" {
|
|
||||||
"helm version --short" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "virtualbox" -Skip:($os.IsBigSur) {
|
|
||||||
"vboxmanage -v" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "vagrant" -Skip:($os.IsBigSur) {
|
|
||||||
"vagrant --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "GitHub CLI" {
|
|
||||||
"gh --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "7-Zip" {
|
|
||||||
"7z i" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "Apache Ant" {
|
|
||||||
"ant -version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
|
|
||||||
It "GNU Tar" {
|
|
||||||
"gtar --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Rust" -Skip:($os.IsHighSierra) {
|
Describe "Rust" -Skip:($os.IsHighSierra) {
|
||||||
@@ -304,33 +320,23 @@ Describe "Haskell" -Skip:($os.IsHighSierra) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "Clang/LLVM" -Skip:($os.IsHighSierra) {
|
Describe "GCC" -Skip:($os.IsHighSierra) {
|
||||||
It "Clang/LLVM is installed" {
|
$testCases = @("8", "9", "10") | ForEach-Object { @{Version = $_} }
|
||||||
"$(brew --prefix llvm)/bin/clang --version" | Should -ReturnZeroExitCode
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Describe "Gcc" -Skip:($os.IsHighSierra) {
|
It "GCC <Version>" -TestCases $testCases {
|
||||||
$testCases = @("8", "9", "10") | ForEach-Object { @{GccVersion = $_} }
|
|
||||||
|
|
||||||
It "Gcc <GccVersion>" -TestCases $testCases {
|
|
||||||
param (
|
param (
|
||||||
[string] $GccVersion
|
[string] $Version
|
||||||
)
|
)
|
||||||
|
|
||||||
"gcc-$GccVersion --version" | Should -ReturnZeroExitCode
|
"gcc-$Version --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Describe "Gfortran" -Skip:($os.IsHighSierra) {
|
It "Gfortran <Version>" -TestCases $testCases {
|
||||||
$testCases = @("8", "9", "10") | ForEach-Object { @{GfortranVersion = $_} }
|
|
||||||
|
|
||||||
It "Gfortran <GfortranVersion>" -TestCases $testCases {
|
|
||||||
param (
|
param (
|
||||||
[string] $GfortranVersion
|
[string] $Version
|
||||||
)
|
)
|
||||||
|
|
||||||
"gfortran-$GfortranVersion --version" | Should -ReturnZeroExitCode
|
"gfortran-$Version --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Gfortran is not found in the default path" {
|
It "Gfortran is not found in the default path" {
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
||||||
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1"
|
Import-Module "$PSScriptRoot/../helpers/Tests.Helpers.psm1"
|
||||||
|
|
||||||
Describe "Node.JS" {
|
Describe "Node.js" {
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
$os = Get-OSVersion
|
$os = Get-OSVersion
|
||||||
$expectedNodeVersion = if ($os.IsHigherThanMojave) { "v14.*" } else { "v8.*" }
|
$expectedNodeVersion = if ($os.IsHigherThanMojave) { "v14.*" } else { "v8.*" }
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Node.JS is installed" {
|
It "Node.js is installed" {
|
||||||
"node --version" | Should -ReturnZeroExitCode
|
"node --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Node.JS $expectedNodeVersion is default" {
|
It "Node.js $expectedNodeVersion is default" {
|
||||||
(Get-CommandResult "node --version").Output | Should -BeLike $expectedNodeVersion
|
(Get-CommandResult "node --version").Output | Should -BeLike $expectedNodeVersion
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,18 +24,18 @@ Describe "Node.JS" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe "NVM" {
|
Describe "nvm" {
|
||||||
BeforeAll {
|
BeforeAll {
|
||||||
$nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh"
|
$nvmPath = Join-Path $env:HOME ".nvm" "nvm.sh"
|
||||||
$nvmInitCommand = ". $nvmPath > /dev/null 2>&1 || true"
|
$nvmInitCommand = ". $nvmPath > /dev/null 2>&1 || true"
|
||||||
}
|
}
|
||||||
|
|
||||||
It "Nvm is installed" {
|
It "nvm is installed" {
|
||||||
$nvmPath | Should -Exist
|
$nvmPath | Should -Exist
|
||||||
"$nvmInitCommand && nvm --version" | Should -ReturnZeroExitCode
|
"$nvmInitCommand && nvm --version" | Should -ReturnZeroExitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
Context "Nvm versions" {
|
Context "nvm versions" {
|
||||||
$NVM_VERSIONS = @(6, 8, 10, 12)
|
$NVM_VERSIONS = @(6, 8, 10, 12)
|
||||||
$testCases = $NVM_VERSIONS | ForEach-Object { @{NvmVersion = $_} }
|
$testCases = $NVM_VERSIONS | ForEach-Object { @{NvmVersion = $_} }
|
||||||
|
|
||||||
|
|||||||
@@ -201,6 +201,36 @@
|
|||||||
{"name": "MarkdownPS"},
|
{"name": "MarkdownPS"},
|
||||||
{"name": "Pester"}
|
{"name": "Pester"}
|
||||||
],
|
],
|
||||||
|
"brew": {
|
||||||
|
"common_packages": [
|
||||||
|
"carthage",
|
||||||
|
"cmake",
|
||||||
|
"subversion",
|
||||||
|
"go",
|
||||||
|
"gnupg",
|
||||||
|
"llvm",
|
||||||
|
"libpq",
|
||||||
|
"zstd",
|
||||||
|
"packer",
|
||||||
|
"helm",
|
||||||
|
"aliyun-cli",
|
||||||
|
"bazelisk",
|
||||||
|
"gh",
|
||||||
|
"p7zip",
|
||||||
|
"ant",
|
||||||
|
"aria2",
|
||||||
|
"gnu-tar",
|
||||||
|
"xctool",
|
||||||
|
"bats",
|
||||||
|
"parallel"
|
||||||
|
],
|
||||||
|
"cask_packages": [
|
||||||
|
"julia",
|
||||||
|
"virtualbox",
|
||||||
|
"vagrant",
|
||||||
|
"r"
|
||||||
|
]
|
||||||
|
},
|
||||||
"toolcache": [
|
"toolcache": [
|
||||||
{
|
{
|
||||||
"name": "PyPy",
|
"name": "PyPy",
|
||||||
|
|||||||
@@ -221,6 +221,36 @@
|
|||||||
{"name": "MarkdownPS"},
|
{"name": "MarkdownPS"},
|
||||||
{"name": "Pester"}
|
{"name": "Pester"}
|
||||||
],
|
],
|
||||||
|
"brew": {
|
||||||
|
"common_packages": [
|
||||||
|
"carthage",
|
||||||
|
"cmake",
|
||||||
|
"subversion",
|
||||||
|
"go",
|
||||||
|
"gnupg",
|
||||||
|
"llvm",
|
||||||
|
"libpq",
|
||||||
|
"zstd",
|
||||||
|
"packer",
|
||||||
|
"helm",
|
||||||
|
"aliyun-cli",
|
||||||
|
"bazelisk",
|
||||||
|
"gh",
|
||||||
|
"p7zip",
|
||||||
|
"ant",
|
||||||
|
"aria2",
|
||||||
|
"gnu-tar",
|
||||||
|
"xctool",
|
||||||
|
"bats",
|
||||||
|
"parallel"
|
||||||
|
],
|
||||||
|
"cask_packages": [
|
||||||
|
"julia",
|
||||||
|
"virtualbox",
|
||||||
|
"vagrant",
|
||||||
|
"r"
|
||||||
|
]
|
||||||
|
},
|
||||||
"toolcache": [
|
"toolcache": [
|
||||||
{
|
{
|
||||||
"name": "Python",
|
"name": "Python",
|
||||||
|
|||||||
@@ -151,6 +151,36 @@
|
|||||||
{"name": "MarkdownPS"},
|
{"name": "MarkdownPS"},
|
||||||
{"name": "Pester"}
|
{"name": "Pester"}
|
||||||
],
|
],
|
||||||
|
"brew": {
|
||||||
|
"common_packages": [
|
||||||
|
"carthage",
|
||||||
|
"cmake",
|
||||||
|
"subversion",
|
||||||
|
"go",
|
||||||
|
"gnupg",
|
||||||
|
"llvm",
|
||||||
|
"libpq",
|
||||||
|
"zstd",
|
||||||
|
"packer",
|
||||||
|
"helm",
|
||||||
|
"aliyun-cli",
|
||||||
|
"bazelisk",
|
||||||
|
"gh",
|
||||||
|
"p7zip",
|
||||||
|
"ant",
|
||||||
|
"aria2",
|
||||||
|
"gnu-tar",
|
||||||
|
"xctool",
|
||||||
|
"bats",
|
||||||
|
"parallel"
|
||||||
|
],
|
||||||
|
"cask_packages": [
|
||||||
|
"julia",
|
||||||
|
"virtualbox",
|
||||||
|
"vagrant",
|
||||||
|
"r"
|
||||||
|
]
|
||||||
|
},
|
||||||
"toolcache": [
|
"toolcache": [
|
||||||
{
|
{
|
||||||
"name": "Python",
|
"name": "Python",
|
||||||
|
|||||||
@@ -84,6 +84,30 @@
|
|||||||
{"name": "MarkdownPS"},
|
{"name": "MarkdownPS"},
|
||||||
{"name": "Pester"}
|
{"name": "Pester"}
|
||||||
],
|
],
|
||||||
|
"brew": {
|
||||||
|
"common_packages": [
|
||||||
|
"carthage",
|
||||||
|
"cmake",
|
||||||
|
"subversion",
|
||||||
|
"go",
|
||||||
|
"gnupg",
|
||||||
|
"llvm",
|
||||||
|
"libpq",
|
||||||
|
"zstd",
|
||||||
|
"packer",
|
||||||
|
"helm",
|
||||||
|
"aliyun-cli",
|
||||||
|
"bazelisk",
|
||||||
|
"gh",
|
||||||
|
"p7zip",
|
||||||
|
"ant",
|
||||||
|
"aria2",
|
||||||
|
"gnu-tar"
|
||||||
|
],
|
||||||
|
"cask_packages": [
|
||||||
|
"julia"
|
||||||
|
]
|
||||||
|
},
|
||||||
"toolcache": [
|
"toolcache": [
|
||||||
{
|
{
|
||||||
"name": "Python",
|
"name": "Python",
|
||||||
|
|||||||
Reference in New Issue
Block a user