diff --git a/images/macos/provision/core/haskell.sh b/images/macos/provision/core/haskell.sh index c2bfc015b..73f4a7af0 100644 --- a/images/macos/provision/core/haskell.sh +++ b/images/macos/provision/core/haskell.sh @@ -20,4 +20,4 @@ done echo "install cabal..." ghcup install-cabal -invoke_tests "Common" "Haskell" +invoke_tests "Haskell" diff --git a/images/macos/provision/core/mongodb.sh b/images/macos/provision/core/mongodb.sh index a2a690efb..4802dc38f 100644 --- a/images/macos/provision/core/mongodb.sh +++ b/images/macos/provision/core/mongodb.sh @@ -11,4 +11,4 @@ echo "Installing mongodb..." brew tap mongodb/brew brew_smart_install "mongodb-community" -invoke_tests "Common" "Mongo" +invoke_tests "Databases" "Mongo" diff --git a/images/macos/provision/core/php.sh b/images/macos/provision/core/php.sh index cb7889faa..fef97641f 100644 --- a/images/macos/provision/core/php.sh +++ b/images/macos/provision/core/php.sh @@ -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" \ No newline at end of file +brew_smart_install "composer" + +invoke_tests "PHP" \ No newline at end of file diff --git a/images/macos/provision/core/pipx-packages.sh b/images/macos/provision/core/pipx-packages.sh index 8e1da3f38..ae39ae821 100644 --- a/images/macos/provision/core/pipx-packages.sh +++ b/images/macos/provision/core/pipx-packages.sh @@ -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" \ No newline at end of file diff --git a/images/macos/provision/core/postgresql.sh b/images/macos/provision/core/postgresql.sh index f09d1d6d5..abcbaf7ce 100644 --- a/images/macos/provision/core/postgresql.sh +++ b/images/macos/provision/core/postgresql.sh @@ -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 \ No newline at end of file +brew services stop postgresql + +invoke_tests "Databases" "PostgreSQL" \ No newline at end of file diff --git a/images/macos/provision/core/python.sh b/images/macos/provision/core/python.sh index 40287aa43..3c237df87 100755 --- a/images/macos/provision/core/python.sh +++ b/images/macos/provision/core/python.sh @@ -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" \ No newline at end of file +echo 'export PATH="$PIPX_BIN_DIR:$PATH"' >> "${HOME}/.bashrc" + +invoke_tests "Python" \ No newline at end of file diff --git a/images/macos/provision/core/ruby.sh b/images/macos/provision/core/ruby.sh index 952c0ea7c..edd32dc68 100755 --- a/images/macos/provision/core/ruby.sh +++ b/images/macos/provision/core/ruby.sh @@ -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 \ No newline at end of file +done + +invoke_tests "Ruby" diff --git a/images/macos/provision/core/rubygem.sh b/images/macos/provision/core/rubygem.sh index e4060671e..7184fe635 100755 --- a/images/macos/provision/core/rubygem.sh +++ b/images/macos/provision/core/rubygem.sh @@ -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 \ No newline at end of file +gem install fastlane + +invoke_tests "RubyGem" \ No newline at end of file diff --git a/images/macos/tests/Common.Tests.ps1 b/images/macos/tests/Common.Tests.ps1 index 6d47c4711..65bc3cccd 100644 --- a/images/macos/tests/Common.Tests.ps1 +++ b/images/macos/tests/Common.Tests.ps1 @@ -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 } } \ No newline at end of file diff --git a/images/macos/tests/Databases.Tests.ps1 b/images/macos/tests/Databases.Tests.ps1 new file mode 100644 index 000000000..6e06a231a --- /dev/null +++ b/images/macos/tests/Databases.Tests.ps1 @@ -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 + } +} \ No newline at end of file diff --git a/images/macos/tests/Haskell.Tests.ps1 b/images/macos/tests/Haskell.Tests.ps1 new file mode 100644 index 000000000..4bbf8884d --- /dev/null +++ b/images/macos/tests/Haskell.Tests.ps1 @@ -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 + } + } +} \ No newline at end of file diff --git a/images/macos/tests/PHP.Tests.ps1 b/images/macos/tests/PHP.Tests.ps1 new file mode 100644 index 000000000..a7c9f3806 --- /dev/null +++ b/images/macos/tests/PHP.Tests.ps1 @@ -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 + } + } +} \ No newline at end of file diff --git a/images/macos/tests/RubyGem.Tests.ps1 b/images/macos/tests/RubyGem.Tests.ps1 new file mode 100644 index 000000000..7cb5531bb --- /dev/null +++ b/images/macos/tests/RubyGem.Tests.ps1 @@ -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 + } +} \ No newline at end of file