9696 # Step: Compile the project treating any warnings as errors.
9797 # Customize this step if a different behavior is desired.
9898 - name : Compiles without warnings
99+ id : compile
99100 run : mix compile --warnings-as-errors
101+
102+ - if : steps.compile.conclusion == 'failure'
103+ run : echo "### Failed on lint" >> $GITHUB_STEP_SUMMARY
100104
101105 # Step: Check that the checked in code has already been formatted.
102106 # This step fails if something was found unformatted.
@@ -118,16 +122,46 @@ jobs:
118122 - name : Run security-focused static analysis
119123 id : sobelow
120124 run : mix sobelow --exit --threshold medium -i Config.HTTPS,Config.CSP
121-
125+
122126 - if : steps.sobelow.conclusion == 'failure'
123127 run : echo "### Failed on sobelow" >> $GITHUB_STEP_SUMMARY
124-
125- - name : Run security-focused static analysis
126- id : dialyzer
127- run : mix dialyzer
128128
129- - if : steps.dialyzer.conclusion == 'failure'
130- run : echo "### Failed on dialyzer" >> $GITHUB_STEP_SUMMARY
129+ # # Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
130+ # # Cache key based on Elixir & Erlang version (also useful when running in matrix)
131+ # - name: Restore PLT cache
132+ # uses: actions/cache/restore@v3
133+ # id: plt_cache
134+ # with:
135+ # key: |
136+ # ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
137+ # restore-keys: |
138+ # ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
139+ # path: |
140+ # priv/plts
141+
142+ # # Create PLTs if no cache was found
143+ # - name: Create PLTs
144+ # if: steps.plt_cache.outputs.cache-hit != 'true'
145+ # run: mix dialyzer --plt
146+
147+ # # By default, the GitHub Cache action will only save the cache if all steps in the job succeed,
148+ # # so we separate the cache restore and save steps in case running dialyzer fails.
149+ # - name: Save PLT cache
150+ # uses: actions/cache/save@v3
151+ # if: steps.plt_cache.outputs.cache-hit != 'true'
152+ # id: plt_cache_save
153+ # with:
154+ # key: |
155+ # ${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
156+ # path: |
157+ # priv/plts
158+
159+ # - name: Run dialyzer
160+ # id: dialyzer
161+ # run: mix dialyzer --format github
162+
163+ # - if: steps.dialyzer.conclusion == 'failure'
164+ # run: echo "### Failed on dialyzer" >> $GITHUB_STEP_SUMMARY
131165
132166 # Step: Execute the tests.
133167 - name : Run tests
0 commit comments