File tree 1 file changed +38
-1
lines changed
1 file changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ To use Dialyzer in CI, you must be aware of several things:
81
81
2 ) The PLT should be cached using the CI caching system
82
82
3 ) The PLT will need to be rebuilt whenever adding a new Erlang or Elixir version to build matrix
83
83
84
- Using Travis, this would look like:
84
+ ### Travis
85
85
86
86
` .travis.yml `
87
87
``` markdown
@@ -101,6 +101,43 @@ cache:
101
101
- priv/plts
102
102
```
103
103
104
+ ### Github Actions
105
+
106
+ ` dialyzer.yml `
107
+ ``` yaml
108
+ ...
109
+ steps :
110
+ - uses : actions/checkout@v2
111
+ - name : Set up Elixir
112
+ id : beam
113
+ uses : erlef/setup-beam@v1
114
+ with :
115
+ elixir-version : " 1.12.3" # Define the elixir version
116
+ otp-version : " 24.1" # Define the OTP version
117
+
118
+ # Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
119
+ # Cache key based on Elixir & Erlang version (also usefull when running in matrix)
120
+ - name : Restore PLT cache
121
+ uses : actions/cache@v2
122
+ id : plt_cache
123
+ with :
124
+ key : |
125
+ ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
126
+ restore-keys : |
127
+ ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
128
+ path : |
129
+ priv/plts
130
+
131
+ # Create PLTs if no cache was found
132
+ - name : Create PLTs
133
+ if : steps.plt_cache.outputs.cache-hit != 'true'
134
+ run : mix dialyzer --plt
135
+
136
+ - name : Run dialyzer
137
+ run : mix dialyzer
138
+
139
+ ```
140
+
104
141
` mix.exs `
105
142
``` elixir
106
143
def project do
You can’t perform that action at this time.
0 commit comments