@@ -10,16 +10,16 @@ jobs:
10
10
strategy :
11
11
matrix :
12
12
include :
13
- - otp : ' 25.3.2.12 '
14
- elixir : ' 1.15.8 '
13
+ - elixir : ' 1.15.8 '
14
+ otp : ' 25.3.2.12 '
15
15
experimental : false
16
16
lint : false
17
- - otp : ' 26.2.5 '
18
- elixir : ' 1.16.3 '
17
+ - elixir : ' 1.16.3 '
18
+ otp : ' 26.2.5 '
19
19
experimental : true
20
20
lint : true
21
- - otp : ' 27.0 '
22
- elixir : ' 1.17.1 '
21
+ - elixir : ' 1.17.1 '
22
+ otp : ' 27.0 '
23
23
experimental : true
24
24
lint : false
25
25
steps :
@@ -32,11 +32,13 @@ jobs:
32
32
version-type : strict
33
33
- name : Restore dependencies cache
34
34
uses : actions/cache@v4
35
+ id : cache
35
36
with :
36
37
path : deps
37
- key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
38
- restore-keys : ${{ runner.os }}-mix-
38
+ key : ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- mix-${{ hashFiles('**/mix.lock') }}
39
+ restore-keys : ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- mix-
39
40
- name : Install Dependencies
41
+ if : steps.cache.outputs.cache-hit != 'true'
40
42
env :
41
43
MIX_ENV : test
42
44
run : |
@@ -63,10 +65,11 @@ jobs:
63
65
version-type : strict
64
66
- name : Restore dependencies cache
65
67
uses : actions/cache@v4
68
+ id : cache
66
69
with :
67
70
path : deps
68
- key : ${{ runner.os }}-mix-${{ hashFiles('test/lockfiles/gun1.lock') }}
69
- restore-keys : ${{ runner.os }}-mix-
71
+ key : ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- mix-gun -${{ hashFiles('test/lockfiles/gun1.lock') }}
72
+ restore-keys : ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}- mix-gun -
70
73
- name : Install Dependencies
71
74
env :
72
75
MIX_ENV : test
79
82
env :
80
83
LOCKFILE : gun1
81
84
run : mix test test/tesla/adapter/gun_test.exs --trace
85
+
86
+ dialyzer :
87
+ runs-on : ubuntu-latest
88
+ name : Dialyzer
89
+ steps :
90
+ - uses : actions/checkout@v4
91
+ - name : Set up Elixir
92
+ uses : erlef/setup-beam@v1
93
+ with :
94
+ elixir-version : ' 1.16.3'
95
+ otp-version : ' 26.2.5'
96
+ version-type : strict
97
+ - name : Restore dependencies cache
98
+ uses : actions/cache@v4
99
+ id : cache
100
+ with :
101
+ path : |
102
+ deps
103
+ _build
104
+ dialyzer
105
+ key : ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-dialyzer-${{ hashFiles('**/mix.lock') }}
106
+ restore-keys : |
107
+ ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-dialyzer-
108
+ - name : Install Dependencies
109
+ if : steps.cache.outputs.cache-hit != 'true'
110
+ env :
111
+ MIX_ENV : test
112
+ run : |
113
+ mix local.rebar --force
114
+ mix local.hex --force
115
+ mix deps.get
116
+ # Doesn't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
117
+ # Cache key based on Elixir & Erlang version.
118
+ - name : Restore PLT cache
119
+ uses : actions/cache@v2
120
+ id : plt_cache
121
+ with :
122
+ key : |
123
+ ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
124
+ restore-keys : |
125
+ ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
126
+ path : |
127
+ priv/plts
128
+ # Create PLTs if no cache was found
129
+ - name : Create PLTs
130
+ if : steps.plt_cache.outputs.cache-hit != 'true'
131
+ run : mix dialyzer --plt
132
+ - name : Run dialyzer
133
+ run : mix dialyzer --format github
0 commit comments