@@ -146,24 +146,27 @@ jobs:
146146 INDEX_STATE1=$(echo "$INDEX_STATE_ENTRY" | cut -d' ' -f2 | tr ':' '-')
147147 echo "INDEX_STATE=$INDEX_STATE1" >> $GITHUB_ENV
148148
149- - name : Form the package list ('cabal.project.freeze')
150- continue-on-error : true
149+ - name : Compute the cache key
150+ id : compute-cache-key
151151 run : |
152152 cabal v2-freeze && \
153153 echo '' && \
154154 echo 'Output:' && \
155155 echo '' && \
156156 cat 'cabal.project.freeze' && \
157157 echo '' || \
158- echo 'WARNING: Could not produce the `freeze`.
158+ echo 'WARNING: Could not produce the `freeze`.'
159+ echo ::set-output name=value::${{ hashFiles('cabal.project.freeze') }}
160+ # Removing freeze file as it can break builds using allow-newer
161+ rm -rf cabal.project.freeze
159162
160163 - name : Hackage sources cache
161164 uses : actions/cache@v2
162165 env :
163166 cache-name : hackage-sources
164167 with :
165- path : ${{ env.CABAL_PKGS_DIR }}
166- key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}
168+ path : ${{ env.CABAL_PKGS_DIR }}
169+ key : ${{ env.cache-name }}-${{ env.INDEX_STATE }}
167170 restore-keys : ${{ env.cache-name }}-
168171
169172 - name : Compiled deps cache
@@ -173,7 +176,7 @@ jobs:
173176 cache-name : compiled-deps
174177 with :
175178 path : ${{ steps.HaskEnvSetup.outputs.cabal-store }}
176- key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
179+ key : ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-${{ steps.compute-cache-key.outputs.value }}
177180 restore-keys : |
178181 ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-${{ env.INDEX_STATE }}-
179182 ${{ env.cache-name }}-${{ runner.os }}-${{ matrix.ghc }}-
@@ -229,6 +232,10 @@ jobs:
229232 name : Test hls-brittany-plugin
230233 run : cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || cabal test hls-brittany-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-brittany-plugin --test-options="$TEST_OPTS"
231234
235+ - if : matrix.test
236+ name : Test hls-floskell-plugin
237+ run : cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || cabal test hls-floskell-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-floskell-plugin --test-options="$TEST_OPTS"
238+
232239 - if : matrix.test
233240 name : Test hls-class-plugin
234241 run : cabal test hls-class-plugin --test-options="$TEST_OPTS" || cabal test hls-class-plugin --test-options="$TEST_OPTS" || LSP_TEST_LOG_COLOR=0 LSP_TEST_LOG_MESSAGES=true LSP_TEST_LOG_STDERR=true cabal test hls-class-plugin --test-options="$TEST_OPTS"
0 commit comments