Skip to content

Commit

Permalink
CI: Always save cache, even on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanGlScott committed Apr 17, 2023
1 parent 595012a commit 44d29a0
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v2
name: Cache cabal store

- uses: actions/cache/restore@v3
name: Restore cabal store cache
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
Expand Down Expand Up @@ -72,3 +73,12 @@ jobs:
- name: Tests
working-directory: ${{ matrix.package }}
run: cabal v2-test

- uses: actions/cache/save@v3
name: Save cabal store cache
if: always()
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist-newstyle
key: cabal-${{ matrix.package }}-${{ matrix.ghc }}-${{ hashFiles('**/cabal.GHC-*') }}-${{ github.sha }}

0 comments on commit 44d29a0

Please sign in to comment.