diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 350ec2e..ef1b267 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,22 +17,23 @@ jobs: fail-fast: false matrix: include: - - otp: '25.x' + - otp: '26.x' os: 'ubuntu-latest' coverage: true xref: true dialyzer: true + - otp: '25.x' + os: 'ubuntu-latest' - otp: '24.x' os: 'ubuntu-latest' - - otp: '23.x' - os: 'ubuntu-20.04' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OTP_VERSION: ${{ matrix.otp }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install OTP and Elixir uses: erlef/setup-beam@v1 @@ -82,7 +83,7 @@ jobs: if: ${{ matrix.dialyzer && steps.plt-cache.outputs.cache-hit != 'true' }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: _build/test/covertool/shards.covertool.xml flags: otp-${{ matrix.otp }} diff --git a/.gitignore b/.gitignore index 755ad9f..c9ece70 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ doc docs /priv/plts /bench +rebar3 diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..cad8d03 --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +erlang 26.2 diff --git a/src/shards.erl b/src/shards.erl index add6b04..5965b74 100644 --- a/src/shards.erl +++ b/src/shards.erl @@ -970,6 +970,15 @@ maybe_register(Name, Pid, Options) -> ok end. +-ifndef(OTP_RELEASE). +%% OTP 20 or lower. +-define(OTP_RELEASE, 20). +-endif. + +-if(?OTP_RELEASE >= 26). +%% @private +wrap_exit() -> ok. +-else. %% @private wrap_exit() -> % We wait for the 'EXIT' signal from the partition supervisor knowing @@ -978,6 +987,7 @@ wrap_exit() -> receive {'EXIT', _Pid, _Reason} -> ok end. +-endif. %% @equiv next(Tab, Key1, shards_meta:get(Tab)) next(Tab, Key1) -> diff --git a/test/shards_SUITE.erl b/test/shards_SUITE.erl index 0435ec4..7fe9807 100644 --- a/test/shards_SUITE.erl +++ b/test/shards_SUITE.erl @@ -40,21 +40,6 @@ t_table_creation_errors/1 ]). -% %% Test Cases Helpers -% -export([ -% t_basic_ops_/1, -% t_match_ops_/1, -% t_select_ops_/1 -% ]). - -% %% Helpers -% -export([ -% init_shards/0, -% init_shards/1, -% cleanup_shards/0, -% delete_shards/0 -% ]). - -define(EXCLUDED_FUNS, [ module_info, all,