diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index c11fdb5..17991f9 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -2,31 +2,36 @@ name: Erlang CI on: push: - branches: [ develop ] + branches: + - nhse-develop + - nhse-develop-3.2 + - nhse-develop-3.4 pull_request: - branches: [ develop ] - + branches: + - nhse-develop + - nhse-develop-3.2 + - nhse-develop-3.4 jobs: build: - runs-on: ubuntu-latest + name: Test on ${{ matrix.os }} with OTP ${{ matrix.otp }} + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - otp: - - "25.1" - - "24.3" - - "22.3" - - container: - image: erlang:${{ matrix.otp }} + otp: [24, 26] + os: [ubuntu-latest] steps: - uses: lukka/get-cmake@latest - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + - name: Install Erlang/OTP + uses: erlef/setup-beam@v1 + with: + otp-version: ${{ matrix.otp }} - name: Compile run: ./rebar3 compile - name: Run xref and dialyzer diff --git a/rebar.config b/rebar.config index 7788b6d..a9592b4 100644 --- a/rebar.config +++ b/rebar.config @@ -4,7 +4,7 @@ deprecated_function_calls, deprecated_functions]}. {cover_enabled, true}. -{deps, [{basho_stats, ".*", {git, "https://github.com/nhs-riak/basho_stats.git", {branch, "nhse-develop"}}}]}. +{deps, [{basho_stats, ".*", {git, "https://github.com/OpenRiak/basho_stats.git", {branch, "nhse-develop"}}}]}. {profiles, [ {test, [{deps, [{proper, ".*", {git, "https://github.com/proper-testing/proper.git", {tag, "v1.4"}}}]}]}, diff --git a/src/hyper.app.src b/src/hyper.app.src index 1d0d655..b862fc8 100644 --- a/src/hyper.app.src +++ b/src/hyper.app.src @@ -7,5 +7,6 @@ kernel, stdlib ]}, + {included_applications, [basho_stats]}, {env, []} ]}. diff --git a/src/hyper_binary.erl b/src/hyper_binary.erl index 9e6f3ba..bfca87c 100644 --- a/src/hyper_binary.erl +++ b/src/hyper_binary.erl @@ -5,7 +5,6 @@ %% inserts to perform in the future. -module(hyper_binary). --include_lib("eunit/include/eunit.hrl"). -behaviour(hyper_register). %%-compile(native). @@ -276,6 +275,8 @@ merge_buf(B, [{Index, Value} | Rest], PrevIndex, Acc) -> -ifdef(TEST). +-include_lib("eunit/include/eunit.hrl"). + merge_test() -> P = 4, M = m(P), Tmp1 = [{1, 1}, diff --git a/src/hyper_binary_rle.erl b/src/hyper_binary_rle.erl index 5d4a481..fa85495 100644 --- a/src/hyper_binary_rle.erl +++ b/src/hyper_binary_rle.erl @@ -1,5 +1,4 @@ -module(hyper_binary_rle). --include_lib("eunit/include/eunit.hrl"). -export([new/1, set/3, compact/1, max_merge/1, max_merge/2, reduce_precision/2, bytes/1]). @@ -200,6 +199,8 @@ take_repeat(<>) -> %% -ifdef(TEST). +-include_lib("eunit/include/eunit.hrl"). + format({rle, <>}) -> rle_to_list(B). diff --git a/src/hyper_gb.erl b/src/hyper_gb.erl index 09ad2d0..21874e4 100644 --- a/src/hyper_gb.erl +++ b/src/hyper_gb.erl @@ -1,5 +1,4 @@ -module(hyper_gb). --include_lib("eunit/include/eunit.hrl"). -behaviour(hyper_register). -export([new/1, @@ -131,6 +130,8 @@ do_decode_registers(<>, I) -> %% -ifdef(TEST). +-include_lib("eunit/include/eunit.hrl"). + sum_test() -> T = set(3, 5, set(1, 1, new(4))),