diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml index ad040f22..e885a86b 100644 --- a/.semaphore/semaphore.yml +++ b/.semaphore/semaphore.yml @@ -122,6 +122,48 @@ blocks: commands: - bats tests/sem_version_focal/${TEST}.bats + + - name: Sem Version Tests Jammy + dependencies: + - "Build local CLIs" + task: + agent: + machine: + type: e2-standard-2 + os_image: ubuntu2204 + prologue: + commands: + - checkout + - artifact pull workflow bin/linux/amd64/cache -d cache-cli/bin/linux/amd64/cache + - artifact pull workflow bin/linux/arm64/cache -d cache-cli/bin/linux/arm64/cache + - artifact pull workflow bin/darwin/amd64/cache -d cache-cli/bin/darwin/amd64/cache + - artifact pull workflow bin/linux/amd64/sem-context -d sem-context/bin/linux/amd64/sem-context + - artifact pull workflow bin/linux/arm64/sem-context -d sem-context/bin/linux/arm64/sem-context + - artifact pull workflow bin/darwin/amd64/sem-context -d sem-context/bin/darwin/amd64/sem-context + - bash release/create.sh + - source release/install_in_tests.sh + - git submodule init && git submodule update + - sudo ./tests/support/bats-core/install.sh /usr/local + jobs: + - name: Sem Version + matrix: + - env_var: TEST + values: + - elixir + - erlang + - gcc + - go + - java + - kubectl + - node + - php + - python + - ruby + - scala + commands: + - bats tests/sem_version_jammy/${TEST}.bats + + - name: Sem Version Tests Jammy ARM dependencies: - "Build local CLIs" @@ -162,7 +204,7 @@ blocks: - ruby - scala commands: - - bats tests/sem_version_jammy_arm/${TEST}.bats + - bats tests/sem_version_jammy/${TEST}.bats - name: Sem Service Tests Jammy ARM diff --git a/sem-install b/sem-install index 4049b2e5..23d3f73b 100644 --- a/sem-install +++ b/sem-install @@ -92,7 +92,7 @@ install::install_elixir() { "1.14"*) local erlang_version="25.3" ;; - "1.15"*) + "1.15"* | "1.16"*) local erlang_version="26.2" ;; *) diff --git a/sem-version b/sem-version index 86e78170..8da2769e 100755 --- a/sem-version +++ b/sem-version @@ -46,6 +46,7 @@ version::change_ruby() { [[ "$software_version" == "3.0" ]] && software_version="3.0.6" [[ "$software_version" == "3.1" ]] && software_version="3.1.4" [[ "$software_version" == "3.2" ]] && software_version="3.2.2" + [[ "$software_version" == "3.3" ]] && software_version="3.3.0" if ! [ -d ~/.rbenv/versions/"${software_version}" ]; then sem-install ruby "${software_version}" @@ -69,6 +70,7 @@ version::change_elixir() { [[ "$software_version" == "1.13" ]] && software_version="1.13.4" [[ "$software_version" == "1.14" ]] && software_version="1.14.5" [[ "$software_version" == "1.15" ]] && software_version="1.15.7" + [[ "$software_version" == "1.16" ]] && software_version="1.16.0" if [[ $(kiex list) != *"${software_version}"* ]];then sem-install elixir "${software_version}" diff --git a/tests/sem_version_focal/elixir.bats b/tests/sem_version_focal/elixir.bats index 79ac8363..6e846cc4 100644 --- a/tests/sem_version_focal/elixir.bats +++ b/tests/sem_version_focal/elixir.bats @@ -77,3 +77,9 @@ setup() { run elixir --version assert_line --partial "Elixir 1.15.7" } + +@test "change elixir to 1.16.0" { + sem-version elixir 1.16.0 + run elixir --version + assert_line --partial "Elixir 1.16.0" +} diff --git a/tests/sem_version_focal/erlang.bats b/tests/sem_version_focal/erlang.bats index 26636f4d..7e2613f1 100644 --- a/tests/sem_version_focal/erlang.bats +++ b/tests/sem_version_focal/erlang.bats @@ -54,3 +54,9 @@ setup() { run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell assert_line --partial "26" } + +@test "change erlang to 26.2" { + sem-version erlang 26.2 + run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell + assert_line --partial "26" +} diff --git a/tests/sem_version_focal/ruby.bats b/tests/sem_version_focal/ruby.bats index 711fa765..a3edfbb1 100644 --- a/tests/sem_version_focal/ruby.bats +++ b/tests/sem_version_focal/ruby.bats @@ -44,6 +44,14 @@ setup() { assert_line --partial "ruby 3.2.2" } +@test "change ruby to 3.3.0" { + + run sem-version ruby 3.3.0 + assert_success + run ruby --version + assert_line --partial "ruby 3.3.0" +} + @test "ruby minor versions test" { run sem-version ruby 2.7 @@ -65,6 +73,11 @@ setup() { assert_success run ruby --version assert_line --partial "ruby 3.2.2" + + run sem-version ruby 3.3 + assert_success + run ruby --version + assert_line --partial "ruby 3.3.0" } @test "change ruby to 4.0.1" { diff --git a/tests/sem_version_jammy_arm/elixir.bats b/tests/sem_version_jammy/elixir.bats similarity index 90% rename from tests/sem_version_jammy_arm/elixir.bats rename to tests/sem_version_jammy/elixir.bats index 00aeb649..e77d0f9c 100644 --- a/tests/sem_version_jammy_arm/elixir.bats +++ b/tests/sem_version_jammy/elixir.bats @@ -46,3 +46,9 @@ setup() { run elixir --version assert_line --partial "Elixir 1.15.7" } + +@test "change elixir to 1.16.0" { + sem-version elixir 1.16.0 + run elixir --version + assert_line --partial "Elixir 1.16.0" +} diff --git a/tests/sem_version_jammy_arm/erlang.bats b/tests/sem_version_jammy/erlang.bats similarity index 91% rename from tests/sem_version_jammy_arm/erlang.bats rename to tests/sem_version_jammy/erlang.bats index 25f30d7f..5c48c794 100644 --- a/tests/sem_version_jammy_arm/erlang.bats +++ b/tests/sem_version_jammy/erlang.bats @@ -64,3 +64,9 @@ setup() { run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell assert_line --partial "26" } + +@test "change erlang to 26.2" { + sem-version erlang 26.2 + run erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell + assert_line --partial "26" +} diff --git a/tests/sem_version_jammy_arm/gcc.bats b/tests/sem_version_jammy/gcc.bats similarity index 100% rename from tests/sem_version_jammy_arm/gcc.bats rename to tests/sem_version_jammy/gcc.bats diff --git a/tests/sem_version_jammy_arm/go.bats b/tests/sem_version_jammy/go.bats similarity index 100% rename from tests/sem_version_jammy_arm/go.bats rename to tests/sem_version_jammy/go.bats diff --git a/tests/sem_version_jammy_arm/java.bats b/tests/sem_version_jammy/java.bats similarity index 100% rename from tests/sem_version_jammy_arm/java.bats rename to tests/sem_version_jammy/java.bats diff --git a/tests/sem_version_jammy_arm/kubectl.bats b/tests/sem_version_jammy/kubectl.bats similarity index 100% rename from tests/sem_version_jammy_arm/kubectl.bats rename to tests/sem_version_jammy/kubectl.bats diff --git a/tests/sem_version_jammy_arm/node.bats b/tests/sem_version_jammy/node.bats similarity index 100% rename from tests/sem_version_jammy_arm/node.bats rename to tests/sem_version_jammy/node.bats diff --git a/tests/sem_version_jammy_arm/php.bats b/tests/sem_version_jammy/php.bats similarity index 82% rename from tests/sem_version_jammy_arm/php.bats rename to tests/sem_version_jammy/php.bats index 943ab446..165ac29c 100644 --- a/tests/sem_version_jammy_arm/php.bats +++ b/tests/sem_version_jammy/php.bats @@ -23,19 +23,6 @@ setup() { } # PHP -@test "change php to 8.1.0" { - - run sem-version php 8.1.0 - assert_success - source ~/.phpbrew/bashrc - run php -v - assert_line --partial "PHP 8.1.0" - run php -m - assert_line --partial "magick" - assert_line --partial "gd" - assert_line --partial "imap" -} - @test "change php to 8.1.23" { run sem-version php 8.1.23 diff --git a/tests/sem_version_jammy_arm/python.bats b/tests/sem_version_jammy/python.bats similarity index 100% rename from tests/sem_version_jammy_arm/python.bats rename to tests/sem_version_jammy/python.bats diff --git a/tests/sem_version_jammy_arm/ruby.bats b/tests/sem_version_jammy/ruby.bats similarity index 84% rename from tests/sem_version_jammy_arm/ruby.bats rename to tests/sem_version_jammy/ruby.bats index 711fa765..a3edfbb1 100644 --- a/tests/sem_version_jammy_arm/ruby.bats +++ b/tests/sem_version_jammy/ruby.bats @@ -44,6 +44,14 @@ setup() { assert_line --partial "ruby 3.2.2" } +@test "change ruby to 3.3.0" { + + run sem-version ruby 3.3.0 + assert_success + run ruby --version + assert_line --partial "ruby 3.3.0" +} + @test "ruby minor versions test" { run sem-version ruby 2.7 @@ -65,6 +73,11 @@ setup() { assert_success run ruby --version assert_line --partial "ruby 3.2.2" + + run sem-version ruby 3.3 + assert_success + run ruby --version + assert_line --partial "ruby 3.3.0" } @test "change ruby to 4.0.1" { diff --git a/tests/sem_version_jammy_arm/scala.bats b/tests/sem_version_jammy/scala.bats similarity index 100% rename from tests/sem_version_jammy_arm/scala.bats rename to tests/sem_version_jammy/scala.bats