Skip to content

Commit 5b2080f

Browse files
committed
Force .ghc.environment files so that doctests work with cabal test
1 parent 95d8814 commit 5b2080f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
6464
- name: Test
6565
run: |
66-
cabal test --disable-optimization
66+
cabal test --enable-tests --disable-optimization
6767
6868
- name: Haddock
6969
run: |

cabal.project

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,19 @@ constraints: foundation -none, cryptonite -none, cryptohash -none
5050
-- location: https://github.com/hvr/cabal-parsers.git
5151
-- tag: 893d128f7680bedafb472c4bd45b12a87ade9166
5252

53+
----------------------------------------------------------------------------
54+
-- Tests
55+
56+
-- Andreas, 2022-02-14, see https://github.com/haskell/cabal/issues/7889.
57+
-- For the doctest to work with `cabal v2-test` we need the environment file.
58+
-- This is produced by `cabal v2-build --write-ghc-environment-files=always`.
59+
-- ALT: start it with `cabal exec -- cabal v2-test` (but this is ugly).
60+
write-ghc-environment-files: always
61+
5362
package hackage-server
5463
-- tests: True
55-
--
64+
65+
----------------------------------------------------------------------------
5666
-- Optional features
5767
--
5868
-- flags: +build-hackage-import

0 commit comments

Comments
 (0)