Skip to content

Commit 133ed94

Browse files
author
Gaël Deest
committed
Re-enable doctests on CI
1 parent 613dcf9 commit 133ed94

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/main.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ${{ matrix.os }}
1313
strategy:
1414
matrix:
15-
os: [ubuntu-latest, macOS-latest]
15+
os: [ubuntu-latest]
1616
cabal: ["3.2"]
1717
ghc:
1818
- "8.8.4"
@@ -40,6 +40,7 @@ jobs:
4040
- name: Configure
4141
run: |
4242
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
43+
cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17'
4344
4445
- name: Freeze
4546
run: |
@@ -59,6 +60,30 @@ jobs:
5960
run: |
6061
cabal test all
6162
63+
- name: Run doctests
64+
run: |
65+
# Necessary for doctest to be found in $PATH
66+
export PATH="$HOME/.cabal/bin:$PATH"
67+
68+
# Filter out base-compat-batteries from .ghc.environment.*, as its modules
69+
# conflict with those of base-compat.
70+
#
71+
# FIXME: This is an ugly hack. Ultimately, we'll want to use cabal-doctest
72+
# (or cabal v2-doctest, if it ever lands) to provide a clean GHC environment.
73+
# This might allow running doctests in GHCJS build as well.
74+
perl -i -e 'while (<ARGV>) { print unless /package-id\s+(base-compat-batteries)-\d+(\.\d+)*/; }' .ghc.environment.*
75+
76+
(cd servant && doctest src)
77+
(cd servant-client && doctest src)
78+
(cd servant-client-core && doctest src)
79+
(cd servant-http-streams && doctest src)
80+
(cd servant-docs && doctest src)
81+
(cd servant-foreign && doctest src)
82+
(cd servant-server && doctest src)
83+
(cd servant-machines && doctest src)
84+
(cd servant-conduit && doctest src)
85+
(cd servant-pipes && doctest src)
86+
6287
stack:
6388
name: stack / ghc ${{ matrix.ghc }}
6489
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)