Skip to content

Commit 28eadf8

Browse files
committed
Add cache
1 parent 6c09312 commit 28eadf8

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/pre-commit.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,24 @@ jobs:
1919

2020
- name: "Install stylish-haskell"
2121
run: |
22-
cabal update
2322
cabal install stylish-haskell
2423
24+
- name: "Check stylish-haskell is available"
25+
run: |
26+
echo $(which stylish-haskell)
27+
28+
- name: Compiled deps cache
29+
id: stylish-haskell-compiled-cache
30+
uses: actions/cache@v2
31+
env:
32+
cache-name: stylish-haskell-compiled-cache
33+
with:
34+
path: ${{ env.CABAL_PKGS_DIR }}
35+
key: ${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-${{ env.INDEX_STATE }}-${{ hashFiles('cabal.project.freeze') }}
36+
restore-keys: |
37+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-${{ env.INDEX_STATE }}-
38+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-${{ inputs.ghc }}-
39+
${{ inputs.cache-prefix }}${{ env.cache-name }}-${{ inputs.os }}-
40+
2541
- uses: actions/setup-python@v3
2642
- uses: pre-commit/action@v3.0.0

0 commit comments

Comments
 (0)