on master help sign in
Add script for running doctest and enable it for GHC 9.0 (#19)
85fe6caAndrzej Rybczak
.github/workflows/haskell-ci.yml+9−7
@@ -8,9 +8,9 @@
8#
8#
9# For more information, see https://github.com/haskell-CI/haskell-ci
9# For more information, see https://github.com/haskell-CI/haskell-ci
10#
10#
11−# version: 0.13.20210606
11+# version: 0.13.20210621
12#
12#
13−# REGENDATA ("0.13.20210606",["github","--config=cabal.haskell-ci","effectful.cabal"])
13+# REGENDATA ("0.13.20210621",["github","--config=cabal.haskell-ci","effectful.cabal"])
14#
14#
15name: Haskell-CI
15name: Haskell-CI
16on:
16on:
@@ -148,7 +148,7 @@ jobs:
148 - name: cache (tools)
148 - name: cache (tools)
149 uses: actions/cache@v2
149 uses: actions/cache@v2
150 with:
150 with:
151− key: ${{ runner.os }}-${{ matrix.compiler }}-tools-60139de7
151+ key: ${{ runner.os }}-${{ matrix.compiler }}-tools-b692a344
152 path: ~/.haskell-ci-tools
152 path: ~/.haskell-ci-tools
153 - name: install cabal-plan
153 - name: install cabal-plan
154 run: |
154 run: |
@@ -161,8 +161,8 @@ jobs:
161 cabal-plan --version
161 cabal-plan --version
162 - name: install doctest
162 - name: install doctest
163 run: |
163 run: |
164− if [ $((HCNUMVER < 90000)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.17' ; fi
164+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then $CABAL --store-dir=$HOME/.haskell-ci-tools/store v2-install $ARG_COMPILER --ignore-project -j2 doctest --constraint='doctest ^>=0.18' ; fi
165− if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --version ; fi
165+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest --version ; fi
166 - name: checkout
166 - name: checkout
167 uses: actions/checkout@v2
167 uses: actions/checkout@v2
168 with:
168 with:
@@ -223,8 +223,10 @@ jobs:
223 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
223 $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
224 - name: doctest
224 - name: doctest
225 run: |
225 run: |
226− if [ $((HCNUMVER < 90000)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi
226+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi
227− if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src ; fi
227+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators src ; fi
228+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then cd ${PKGDIR_effectful} || false ; fi
229+ if [ $((HCNUMVER < 90200)) -ne 0 ] ; then doctest -XBangPatterns -XConstraintKinds -XDataKinds -XFlexibleContexts -XFlexibleInstances -XGADTs -XGeneralizedNewtypeDeriving -XLambdaCase -XMultiParamTypeClasses -XNoStarIsType -XRankNTypes -XRecordWildCards -XRoleAnnotations -XScopedTypeVariables -XStrictData -XTupleSections -XTypeApplications -XTypeFamilies -XTypeOperators utils ; fi
228 - name: cabal check
230 - name: cabal check
229 run: |
231 run: |
230 cd ${PKGDIR_effectful} || false
232 cd ${PKGDIR_effectful} || false
cabal.haskell-ci+1−1
@@ -1,6 +1,6 @@
1branches: master
1branches: master
2
2
3−doctest: <9
3+doctest: <9.2
4tests: True
4tests: True
5benchmarks: True
5benchmarks: True
6
6
doctest.shnew file+29
@@ -0,0 +1,29 @@
1+#!/bin/sh
2+#
3+# For this to work you need to:
4+#
5+# - Put "write-ghc-environment-files: always" in your cabal.project.local.
6+#
7+# - Compile doctest with the same GHC version the project currently uses.
8+#
9+
10+doctest src \
11+ -XBangPatterns \
12+ -XConstraintKinds \
13+ -XDataKinds \
14+ -XFlexibleContexts \
15+ -XFlexibleInstances \
16+ -XGADTs \
17+ -XGeneralizedNewtypeDeriving \
18+ -XLambdaCase \
19+ -XMultiParamTypeClasses \
20+ -XNoStarIsType \
21+ -XRankNTypes \
22+ -XRecordWildCards \
23+ -XRoleAnnotations \
24+ -XScopedTypeVariables \
25+ -XStrictData \
26+ -XTupleSections \
27+ -XTypeApplications \
28+ -XTypeFamilies \
29+ -XTypeOperators