Re-enable doctests on CI

This commit is contained in:
Gaël Deest 2021-03-16 10:23:23 +01:00
parent 613dcf9ed5
commit 133ed94442

View file

@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
os: [ubuntu-latest]
cabal: ["3.2"]
ghc:
- "8.8.4"
@ -40,6 +40,7 @@ jobs:
- name: Configure
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal install --ignore-project -j2 doctest --constraint='doctest ^>=0.17'
- name: Freeze
run: |
@ -59,6 +60,30 @@ jobs:
run: |
cabal test all
- name: Run doctests
run: |
# Necessary for doctest to be found in $PATH
export PATH="$HOME/.cabal/bin:$PATH"
# Filter out base-compat-batteries from .ghc.environment.*, as its modules
# conflict with those of base-compat.
#
# FIXME: This is an ugly hack. Ultimately, we'll want to use cabal-doctest
# (or cabal v2-doctest, if it ever lands) to provide a clean GHC environment.
# This might allow running doctests in GHCJS build as well.
perl -i -e 'while (<ARGV>) { print unless /package-id\s+(base-compat-batteries)-\d+(\.\d+)*/; }' .ghc.environment.*
(cd servant && doctest src)
(cd servant-client && doctest src)
(cd servant-client-core && doctest src)
(cd servant-http-streams && doctest src)
(cd servant-docs && doctest src)
(cd servant-foreign && doctest src)
(cd servant-server && doctest src)
(cd servant-machines && doctest src)
(cd servant-conduit && doctest src)
(cd servant-pipes && doctest src)
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest