Skip to content

Commit 3b98284

Browse files
authored
[#65] Migrate the Redis adapter to Nebulex v3 (#66)
1 parent 9106372 commit 3b98284

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2975
-2543
lines changed

.formatter.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ locals_without_parens = [
55
]
66

77
[
8+
import_deps: [:nebulex],
89
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"],
910
line_length: 100,
1011
locals_without_parens: locals_without_parens,

.github/workflows/ci.yml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,26 @@ on:
1111
jobs:
1212
nebulex_test:
1313
name: >-
14-
NebulexRedisAdapter Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} /
14+
Nebulex.Adapters.Redis Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }} /
1515
OS ${{ matrix.os }})
1616
runs-on: ${{ matrix.os }}
1717

1818
strategy:
1919
matrix:
2020
include:
21-
- elixir: 1.17.x
21+
- elixir: 1.18.x
2222
otp: 27.x
2323
os: 'ubuntu-latest'
24-
style: true
24+
lint: true
2525
coverage: true
2626
dialyzer: true
27-
- elixir: 1.17.x
28-
otp: 26.x
29-
os: 'ubuntu-latest'
30-
- elixir: 1.16.x
31-
otp: 26.x
32-
os: 'ubuntu-latest'
3327
- elixir: 1.15.x
3428
otp: 25.x
3529
os: 'ubuntu-latest'
36-
- elixir: 1.14.x
37-
otp: 23.x
38-
os: 'ubuntu-20.04'
3930

4031
env:
4132
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
33+
CODECOV_TOKEN: '${{ secrets.CODECOV_TOKEN }}'
4234
MIX_ENV: test
4335
NEBULEX_PATH: nebulex
4436
REDIS_CLUSTER_IP: '0.0.0.0'
@@ -82,25 +74,40 @@ jobs:
8274
mix deps.get
8375
if: ${{ steps.mix-cache.outputs.cache-hit != 'true' }}
8476

85-
- name: Compile code
77+
- name: Compile deps
78+
run: mix deps.compile
79+
80+
- name: Check unused dependencies
81+
run: mix deps.unlock --check-unused
82+
if: ${{ matrix.lint }}
83+
84+
- name: Compile lint
8685
run: mix compile --warnings-as-errors
86+
if: ${{ matrix.lint }}
8787

8888
- name: Run style and code consistency checks
8989
run: |
9090
mix format --check-formatted
9191
mix credo --strict
92-
if: ${{ matrix.style }}
92+
if: ${{ matrix.lint }}
9393

9494
- name: Run tests
9595
run: |
9696
epmd -daemon
97-
mix test --trace
97+
mix test --exclude nebulex_test
9898
if: ${{ !matrix.coverage }}
9999

100100
- name: Run tests with coverage
101101
run: |
102102
epmd -daemon
103-
mix coveralls.github
103+
mix coveralls.json --exclude nebulex_test
104+
if: ${{ matrix.coverage }}
105+
106+
- name: Upload coverage reports to Codecov
107+
uses: codecov/codecov-action@v5
108+
with:
109+
fail_ci_if_error: true
110+
flags: unittests-elixir-${{ matrix.elixir }}-otp-${{ matrix.otp }}
104111
if: ${{ matrix.coverage }}
105112

106113
- name: Restore PLT Cache

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
elixir 1.17.0-otp-27
2-
erlang 27.0
1+
elixir 1.18.3-otp-27
2+
erlang 27.3.3

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright (c) 2018 Carlos Andres Bolaños R.A.
44

0 commit comments

Comments
 (0)