mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
[macOS] Pester tests invocation after install. (#2421)
* [macOS] Fail Pester tests on error * return it back * [macOS] Pester tests invokation after install * fix nitpicks * CocoaPods fix
This commit is contained in:
@@ -20,4 +20,4 @@ done
|
||||
echo "install cabal..."
|
||||
ghcup install-cabal
|
||||
|
||||
invoke_tests "Common" "Haskell"
|
||||
invoke_tests "Haskell"
|
||||
|
||||
@@ -11,4 +11,4 @@ echo "Installing mongodb..."
|
||||
brew tap mongodb/brew
|
||||
brew_smart_install "mongodb-community"
|
||||
|
||||
invoke_tests "Common" "Mongo"
|
||||
invoke_tests "Databases" "Mongo"
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
echo Installing PHP
|
||||
brew_smart_install "php"
|
||||
|
||||
echo Installing composer
|
||||
brew_smart_install "composer"
|
||||
brew_smart_install "composer"
|
||||
|
||||
invoke_tests "PHP"
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
export PATH="$PATH:/opt/pipx_bin"
|
||||
|
||||
@@ -17,3 +18,5 @@ for package in $pipx_packages; do
|
||||
pipx install $package
|
||||
fi
|
||||
done
|
||||
|
||||
invoke_tests "PipxPackages"
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
source ~/utils/utils.sh
|
||||
source ~/utils/invoke-tests.sh
|
||||
|
||||
#Install latest version of postgresql
|
||||
brew_smart_install "postgres"
|
||||
@@ -24,4 +25,6 @@ while [ $i -gt 0 ]; do
|
||||
done
|
||||
|
||||
#Stop postgresql
|
||||
brew services stop postgresql
|
||||
brew services stop postgresql
|
||||
|
||||
invoke_tests "Databases" "PostgreSQL"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo "Installing Python Tooling"
|
||||
@@ -26,4 +26,6 @@ brew_smart_install "pipx"
|
||||
|
||||
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"
|
||||
echo 'export PATH="$PIPX_BIN_DIR:$PATH"' >> "${HOME}/.bashrc"
|
||||
|
||||
invoke_tests "Python"
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Installing Ruby...
|
||||
@@ -40,4 +40,6 @@ for TOOLSET_VERSION in ${TOOLSET_VERSIONS[@]}; do
|
||||
echo "Create complete file"
|
||||
touch $COMPLETE_FILE_PATH
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
invoke_tests "Ruby"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash -e -o pipefail
|
||||
|
||||
source ~/utils/invoke-tests.sh
|
||||
source ~/utils/utils.sh
|
||||
|
||||
echo Updating RubyGems...
|
||||
@@ -29,4 +29,6 @@ echo Installing bundler...
|
||||
gem install bundler --force
|
||||
|
||||
echo Installing fastlane tools...
|
||||
gem install fastlane
|
||||
gem install fastlane
|
||||
|
||||
invoke_tests "RubyGem"
|
||||
@@ -156,61 +156,12 @@ Describe ".NET" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "CocoaPods" {
|
||||
It "CocoaPods" {
|
||||
"pod --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Homebrew" {
|
||||
It "Homebrew" {
|
||||
"brew --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Common utilities" {
|
||||
|
||||
It "Bundler" {
|
||||
"bundler --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
Context "Nomad" -Skip:($os.IsBigSur) {
|
||||
It "Nomad CLI" {
|
||||
$result = Get-CommandResult "gem list"
|
||||
$result.Output | Should -BeLike "*nomad-cli*"
|
||||
}
|
||||
|
||||
It "Nomad CLI IPA" {
|
||||
"ipa --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
It "Fastlane" {
|
||||
"fastlane --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "xcpretty" {
|
||||
"xcpretty --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PostgreSQL-Client" {
|
||||
"psql --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PostgreSQL-Server" {
|
||||
"pg_config --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PHP" {
|
||||
Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*"
|
||||
"php --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Composer" {
|
||||
"composer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Rust" -Skip:($os.IsHighSierra) {
|
||||
It "Rustup is installed" {
|
||||
"rustup --version" | Should -ReturnZeroExitCode
|
||||
@@ -243,20 +194,6 @@ Describe "Rust" -Skip:($os.IsHighSierra) {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Haskell" -Skip:($os.IsHighSierra) {
|
||||
It "GHCup" {
|
||||
"ghcup --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "GHC" {
|
||||
"ghc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "Cabal" {
|
||||
"cabal --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "GCC" -Skip:($os.IsHighSierra) {
|
||||
$testCases = @("8", "9", "10") | ForEach-Object { @{Version = $_} }
|
||||
|
||||
@@ -369,9 +306,8 @@ Describe "Stack" -Skip:($os.IsHighSierra) {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Mongo" {
|
||||
It "mongodb" {
|
||||
"mongo --version" | Should -ReturnZeroExitCode
|
||||
"mongod --version"| Should -ReturnZeroExitCode
|
||||
Describe "CocoaPods" {
|
||||
It "CocoaPods" {
|
||||
"pod --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
16
images/macos/tests/Databases.Tests.ps1
Normal file
16
images/macos/tests/Databases.Tests.ps1
Normal file
@@ -0,0 +1,16 @@
|
||||
Describe "Mongo" {
|
||||
It "mongodb" {
|
||||
"mongo --version" | Should -ReturnZeroExitCode
|
||||
"mongod --version"| Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "PostgreSQL" {
|
||||
It "PostgreSQL-Client" {
|
||||
"psql --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
|
||||
It "PostgreSQL-Server" {
|
||||
"pg_config --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
19
images/macos/tests/Haskell.Tests.ps1
Normal file
19
images/macos/tests/Haskell.Tests.ps1
Normal file
@@ -0,0 +1,19 @@
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Haskell" -Skip:($os.IsHighSierra) {
|
||||
Context "GHCup" {
|
||||
It "GHCup" {
|
||||
"ghcup --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Context "GHC" {
|
||||
It "GHC" {
|
||||
"ghc --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Context "Cabal" {
|
||||
It "Cabal" {
|
||||
"cabal --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
15
images/macos/tests/PHP.Tests.ps1
Normal file
15
images/macos/tests/PHP.Tests.ps1
Normal file
@@ -0,0 +1,15 @@
|
||||
Describe "PHP" {
|
||||
Context "PHP" {
|
||||
It "PHP Path" {
|
||||
Get-WhichTool "php" | Should -Not -BeLike "/usr/bin/php*"
|
||||
}
|
||||
It "PHP version" {
|
||||
"php --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Context "Composer" {
|
||||
It "Composer" {
|
||||
"composer --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
33
images/macos/tests/RubyGem.Tests.ps1
Normal file
33
images/macos/tests/RubyGem.Tests.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
$os = Get-OSVersion
|
||||
|
||||
Describe "Bundler" {
|
||||
It "Bundler" {
|
||||
"bundler --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Nomad" -Skip:($os.IsBigSur) {
|
||||
Context "Nomad" {
|
||||
It "Nomad CLI" {
|
||||
$result = Get-CommandResult "gem list"
|
||||
$result.Output | Should -BeLike "*nomad-cli*"
|
||||
}
|
||||
}
|
||||
Context "Nomad CLI" {
|
||||
It "Nomad CLI IPA" {
|
||||
"ipa --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Fastlane" {
|
||||
It "Fastlane" {
|
||||
"fastlane --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
|
||||
Describe "xcpretty" {
|
||||
It "xcpretty" {
|
||||
"xcpretty --version" | Should -ReturnZeroExitCode
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user