Skip to content

Commit 978011a

Browse files
committed
Update deps
1 parent 49fa29c commit 978011a

File tree

6 files changed

+294
-76
lines changed

6 files changed

+294
-76
lines changed

.github/workflows/ci.yml

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,94 +10,103 @@ on:
1010

1111
jobs:
1212
nebulex_test:
13-
name: 'Nebulex.Adapters.Cachex Test (Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }})'
14-
runs-on: ubuntu-latest
13+
name: >-
14+
Nebulex.Adapters.Cachex Test (Elixir ${{ matrix.elixir }}
15+
/ OTP ${{ matrix.otp }} / OS ${{ matrix.os }})
16+
runs-on: ${{ matrix.os }}
1517

1618
strategy:
1719
matrix:
1820
include:
19-
- elixir: 1.11.x
20-
otp: 23.x
21+
- elixir: 1.14.x
22+
otp: 25.x
23+
os: 'ubuntu-latest'
24+
style: true
2125
coverage: true
2226
dialyzer: true
23-
- elixir: 1.10.x
27+
- elixir: 1.13.x
28+
otp: 24.x
29+
os: 'ubuntu-latest'
30+
- elixir: 1.12.x
2431
otp: 23.x
25-
- elixir: 1.10.x
26-
otp: 22.x
27-
- elixir: 1.9.x
28-
otp: 22.x
32+
os: 'ubuntu-20.04'
2933

3034
env:
3135
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
3236
MIX_ENV: test
3337
NEBULEX_PATH: nebulex
3438

3539
steps:
36-
- uses: actions/checkout@v2
40+
- uses: actions/checkout@v3
3741

3842
- name: Install OTP and Elixir
39-
uses: actions/setup-elixir@v1.5.0
43+
uses: erlef/setup-beam@v1
4044
with:
4145
otp-version: '${{ matrix.otp }}'
4246
elixir-version: '${{ matrix.elixir }}'
43-
experimental-otp: true
4447

4548
- name: Cache deps
46-
uses: actions/cache@v1
49+
uses: actions/cache@v3
50+
id: mix-cache
4751
with:
4852
path: deps
4953
key: >-
5054
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{
5155
hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
52-
restore-keys: |
53-
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
5456
5557
- name: Cache _build
56-
uses: actions/cache@v1
58+
uses: actions/cache@v3
5759
with:
5860
path: _build
5961
key: >-
6062
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{
6163
hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
62-
restore-keys: |
63-
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{
64-
hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
64+
65+
- name: Install Nebulex
66+
run: mix nbx.setup
6567

6668
- name: Install Dependencies
6769
run: |
6870
mix local.hex --force
6971
mix local.rebar --force
70-
mix nbx.setup
7172
mix deps.get
73+
if: ${{ steps.mix-cache.outputs.cache-hit != 'true' }}
74+
75+
- name: Compile code
76+
run: mix compile --warnings-as-errors
7277

7378
- name: Run style and code consistency checks
7479
run: |
75-
mix compile --warnings-as-errors
7680
mix format --check-formatted
7781
mix credo --strict
82+
if: ${{ matrix.style }}
7883

7984
- name: Run tests
8085
run: |
8186
epmd -daemon
8287
mix test --trace
83-
if: ${{!matrix.coverage}}
88+
if: ${{ !matrix.coverage }}
8489

8590
- name: Run tests with coverage
8691
run: |
8792
epmd -daemon
8893
mix coveralls.github
89-
if: ${{matrix.coverage}}
94+
if: ${{ matrix.coverage }}
9095

91-
- name: Cache PLT
92-
uses: actions/cache@v1
96+
- name: Restore PLT Cache
97+
uses: actions/cache@v3
98+
id: plt-cache
9399
with:
94100
path: priv/plts
95-
key: '${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt-v2'
96-
restore-keys: |
97-
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt-v2
101+
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plt-v2
102+
if: ${{ matrix.dialyzer }}
98103

99-
- name: Run static analysis checks
104+
- name: Create PLTs
100105
run: |
101-
mix sobelow --exit --skip
102-
mix dialyzer --format short
103-
if: ${{matrix.dialyzer}}
106+
mkdir -p priv/plts
107+
mix dialyzer --plt
108+
if: ${{ matrix.dialyzer && steps.plt-cache.outputs.cache-hit != 'true' }}
109+
110+
- name: Run dialyzer
111+
run: mix dialyzer --format github
112+
if: ${{ matrix.dialyzer && steps.plt-cache.outputs.cache-hit != 'true' }}

mix.exs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ defmodule NebulexAdaptersCachex.MixProject do
22
use Mix.Project
33

44
@source_url "https://github.com/cabol/nebulex_adapters_cachex"
5-
@version "2.1.0"
6-
@nbx_vsn "2.1.0"
5+
@version "2.1.1"
6+
@nbx_tag "2.5.2"
7+
@nbx_vsn "2.5"
78

89
def project do
910
[
@@ -50,28 +51,28 @@ defmodule NebulexAdaptersCachex.MixProject do
5051
defp deps do
5152
[
5253
nebulex_dep(),
53-
{:cachex, "~> 3.3"},
54-
{:telemetry, "~> 0.4", optional: true},
54+
{:cachex, "~> 3.6"},
55+
{:telemetry, "~> 0.4 or ~> 1.0", optional: true},
5556

5657
# Test & Code Analysis
57-
{:excoveralls, "~> 0.13", only: :test},
58-
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
59-
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
60-
{:sobelow, "~> 0.10", only: [:dev, :test], runtime: false},
61-
{:stream_data, "~> 0.5", only: [:dev, :test]},
58+
{:excoveralls, "~> 0.17", only: :test},
59+
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
60+
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
61+
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
62+
{:stream_data, "~> 0.6", only: [:dev, :test]},
6263

6364
# Benchmark Test
64-
{:benchee, "~> 1.0", only: :test},
65+
{:benchee, "~> 1.1", only: :test},
6566
{:benchee_html, "~> 1.0", only: :test},
6667

6768
# Docs
68-
{:ex_doc, "~> 0.23", only: [:dev, :test], runtime: false}
69+
{:ex_doc, "~> 0.30", only: [:dev, :test], runtime: false}
6970
]
7071
end
7172

7273
defp nebulex_dep do
7374
if path = System.get_env("NEBULEX_PATH") do
74-
{:nebulex, "~> #{@nbx_vsn}", path: path}
75+
{:nebulex, "~> #{@nbx_tag}", path: path}
7576
else
7677
{:nebulex, "~> #{@nbx_vsn}"}
7778
end
@@ -81,7 +82,7 @@ defmodule NebulexAdaptersCachex.MixProject do
8182
[
8283
"nbx.setup": [
8384
"cmd rm -rf nebulex",
84-
"cmd git clone --depth 1 --branch v#{@nbx_vsn} https://github.com/cabol/nebulex"
85+
"cmd git clone --depth 1 --branch v#{@nbx_tag} https://github.com/cabol/nebulex"
8586
],
8687
check: [
8788
"compile --warnings-as-errors",
@@ -110,7 +111,6 @@ defmodule NebulexAdaptersCachex.MixProject do
110111
flags: [
111112
:unmatched_returns,
112113
:error_handling,
113-
:race_conditions,
114114
:no_opaque,
115115
:unknown,
116116
:no_return

0 commit comments

Comments
 (0)