diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78eed44..1b04b67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,9 @@ permissions: jobs: fmt: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Prepare run: | sudo apt update @@ -17,8 +17,8 @@ jobs: - name: Install Erlang/OTP uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 with: - otp-version: '26.2.4' - rebar3-version: '3.23.0' + otp-version: '28.1.1' + rebar3-version: '3.25.1' - name: erlang-formatter run: | rebar3 as check fmt @@ -33,7 +33,7 @@ jobs: spellcheck: runs-on: ubuntu-latest steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install typos uses: taiki-e/install-action@14083e64ac8cf1f5e54356df00b9779b23e192a1 # v2.58.29 with: @@ -42,23 +42,22 @@ jobs: run: typos --config=.github/typos.toml build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: include: - - otp-version: '27.1.2' - - otp-version: '26.2.5.5' - - otp-version: '25.3.2.15' + - otp-version: '28.1.1' + - otp-version: '27.3.4.6' steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install Erlang/OTP uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 with: otp-version: ${{ matrix.otp-version }} - rebar3-version: '3.23.0' + rebar3-version: '3.25.1' - name: Install packages for common tests - uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.3 + uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 with: packages: redis-server faketime version: 1.0 @@ -69,4 +68,11 @@ jobs: - name: Run common tests run: rebar3 ct - name: Run dialyzer - run: rebar3 as test dialyzer + run: | + # Remove remnants from "rebar3 ct" that creates problems for the dialyzer. + # rebar3 might add ct_hooks that are not found by the dialyzer and will + # create warnings if not rebuilt. Example of a warning: + # test/ered_cluster_SUITE.erl + # Line 72 Column 13: Unknown function cthr:pal/1 + rebar3 as test clean + rebar3 as test dialyzer diff --git a/.github/workflows/db-compatibility.yml b/.github/workflows/db-compatibility.yml index 764ee8b..75ccaf3 100644 --- a/.github/workflows/db-compatibility.yml +++ b/.github/workflows/db-compatibility.yml @@ -8,25 +8,27 @@ permissions: jobs: valkey: name: Valkey ${{ matrix.valkey-version }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: include: - - valkey-version: 8.0.1 - - valkey-version: 7.2.5 + - valkey-version: 9.0.0 + - valkey-version: 8.1.4 + - valkey-version: 8.0.6 + - valkey-version: 7.2.11 steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install redis-cli required by common tests - uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.3 + uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 with: packages: redis-server version: 1.0 - name: Install Erlang/OTP uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 with: - otp-version: '26.2.4' - rebar3-version: '3.23.0' + otp-version: '28.1.1' + rebar3-version: '3.25.1' - name: Build and run common tests env: SERVER_DOCKER_IMAGE: valkey/valkey:${{ matrix.valkey-version }} @@ -35,7 +37,7 @@ jobs: redis: name: Redis ${{ matrix.redis-version }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -44,17 +46,17 @@ jobs: - redis-version: 7.0.15 - redis-version: 6.2.14 steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install packages for common tests - uses: awalsh128/cache-apt-pkgs-action@2c09a5e66da6c8016428a2172bd76e5e4f14bb17 # v1.5.3 + uses: awalsh128/cache-apt-pkgs-action@acb598e5ddbc6f68a970c5da0688d2f3a9f04d05 # v1.6.0 with: packages: redis-server faketime version: 1.0 - name: Install Erlang/OTP uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 with: - otp-version: '26.2.4' - rebar3-version: '3.23.0' + otp-version: '28.1.1' + rebar3-version: '3.25.1' - name: Build and run common tests env: SERVER_DOCKER_IMAGE: redis:${{ matrix.redis-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c73634..6806903 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,18 +14,22 @@ jobs: name: Check ered application version runs-on: ubuntu-latest steps: - - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0 - name: Install Erlang/OTP uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4 with: - otp-version: '27.1.2' - rebar3-version: '3.23.0' + otp-version: '28.1.1' + rebar3-version: '3.25.1' - name: Check if vsn matches pushed tag (see src/ered.app.src). run: | - rebar3 shell --apps ered --eval "$(cat << EOF + rebar3 compile + erl -noshell -pa _build/default/lib/*/ebin -eval "$(cat <<'EOF' Version = "${{ github.ref_name }}", + application:start(ered), case application:get_key(ered, vsn) of {ok, Version} -> + io:format(user, "Version check ok, vsn and pushed tag is ~p~n", + [Version]), halt(0,[]); Error -> io:format(user, "Version check failed, got ~p while pushed tag is ~s~n", diff --git a/rebar.config b/rebar.config index d006643..f37d738 100644 --- a/rebar.config +++ b/rebar.config @@ -10,7 +10,4 @@ {profiles, [{check, [{plugins, [{rebar3_fmt, "1.18.0"}]}]}]}. -%% In OTP-26 the 'unknown function or type' warning is on by default. -%% We disable this again due to missing supervisor types in OTP-26, see: -%% https://github.com/erlang/otp/pull/6893 -{dialyzer, [{warnings, [no_unknown]}]}. +{dialyzer, [{plt_extra_apps, [common_test, eunit, public_key]}]}.