Skip to content

Commit

Permalink
alias version bump (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-stefanovic authored Dec 26, 2023
1 parent 8391652 commit 63bab40
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 15 deletions.
44 changes: 43 additions & 1 deletion .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sem-install
Original file line number Diff line number Diff line change
Expand Up @@ -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"
;;
*)
Expand Down
2 changes: 2 additions & 0 deletions sem-version
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand All @@ -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}"
Expand Down
6 changes: 6 additions & 0 deletions tests/sem_version_focal/elixir.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
6 changes: 6 additions & 0 deletions tests/sem_version_focal/erlang.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
13 changes: 13 additions & 0 deletions tests/sem_version_focal/ruby.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" {
Expand Down
File renamed without changes.

0 comments on commit 63bab40

Please sign in to comment.