Skip to content

Commit

Permalink
Change cache keys in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
a5ob7r committed Mar 14, 2024
1 parent ac397f3 commit 8f38cc5
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}

- name: Freeze dependencies
run: cabal freeze
- name: Configure the build and dry-run it
run: |
cabal configure --enable-tests --jobs --flags=pedantic
cabal build all --dry-run
- uses: actions/cache@v4
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ci-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
key: ci-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }}
restore-keys: |
ci-${{ runner.os }}-${{ matrix.ghc }}-
Expand All @@ -56,22 +58,12 @@ jobs:
;;
esac
- name: Configure
run: |
rm cabal.project.freeze
cabal configure --jobs --flags=pedantic
- name: Test
run: cabal test

- name: Build
- name: Install
run: cabal install --overwrite-policy=always

- name: Configure for Test
run: |
rm -fv cabal.project.local
cabal configure --enable-tests --jobs --flags=pedantic
- name: Run tests
run: cabal test

- name: Run golden tests
run: goldplate --pretty-diff golden-test

Expand Down

0 comments on commit 8f38cc5

Please sign in to comment.