Skip to content

Commit 1c6e881

Browse files
committed
Improve ci on fix-whitespace installation
1 parent fdbebcc commit 1c6e881

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,19 @@ jobs:
3737
ghc-version: ${{ matrix.ghc }}
3838
cabal-version: ${{ matrix.cabal }}
3939

40-
# Install fix-whitespace since we need it for tests
41-
- name: Install whitespace
42-
run: cabal install fix-whitespace
43-
4440
# Generate a cabal.project.freeze file with all dependencies. We use the
4541
# hash of this as the cache key, so when a dependency changes we upload a
4642
# new cache.
4743
- name: Freeze
4844
run: cabal freeze
4945

46+
# Install fix-whitespace since we need it for tests.
47+
# This is done after the freeze to make sure we re-use the packages
48+
- name: Install fix-whitespace
49+
run: |
50+
echo "import: cabal.project" > cabal.project.ci
51+
cabal install fix-whitespace --project-file=cabal.project.ci
52+
5053
# Cache the contents of ~/.cabal/store to avoid rebuilding dependencies for
5154
# every build. `restore-keys` makes it use the latest cache even if the
5255
# fingerprint doesn't match, so we don't need to start from scratch every

0 commit comments

Comments
 (0)