Skip to content

Commit 0fa12e4

Browse files
committed
Fix cabal test not solving for test suite in CI
For some reason, it's not required for the solver to include the test suite when running `cabal test`. This means that there is a chance that `cabal test` can reach a local maxima of dependencies that bizzarely doesn't contain the test suite itself. This is tracked in: haskell/cabal#7883 The solution is either to add tests: True to cabal.project, or call `cabal test` with the --enable-tests flag. This commit does the latter in the CI, but eventually it'd be nice to get rid of the confusing flag.
1 parent be0af7b commit 0fa12e4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/test.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ jobs:
5959
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
6060
6161
- name: Build the project
62-
run: cabal build
62+
# Use --enable-tests until https://github.com/haskell/cabal/issues/7883
63+
# is fixed, as otherwise build will solve dependencies without considering
64+
# the test-suite dependencies, and then the tests will fail.
65+
run: cabal build --enable-tests
6366

6467
- name: Run the tests
65-
run: cabal test
68+
# Use --enable-tests until https://github.com/haskell/cabal/issues/7883
69+
# is fixed, as otherwise cabal test can sometimes reach a local maxima
70+
# of dependencies that bizarrely doesn't (!) include the test suite.
71+
run: cabal test --enable-tests

0 commit comments

Comments
 (0)