on master help sign in
Enable CI for cabal-docspec
487f6b3Ranjeet Kumar Ranjan
.github/workflows/haskell.yml+22−2
@@ -44,6 +44,7 @@ jobs:
44 # Pull token from "secrets" setting of the github repo
44 # Pull token from "secrets" setting of the github repo
45 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
45 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
46 COVERAGE: ${{ matrix.coverage }}
46 COVERAGE: ${{ matrix.coverage }}
47+ DOCTEST: ${{ matrix.doctest }}
47
48
48 runs-on: ${{ matrix.runner }}
49 runs-on: ${{ matrix.runner }}
49 strategy:
50 strategy:
@@ -54,6 +55,7 @@ jobs:
54 - 8.10.4+stack
55 - 8.10.4+stack
55 - 8.10.4+macOS
56 - 8.10.4+macOS
56 - 8.10.4+linux+coverage+cabal
57 - 8.10.4+linux+coverage+cabal
58+ - 8.10.4+docspec
57 - 8.8.4
59 - 8.8.4
58 - 8.8.4+inspection+fusion-plugin+Werror
60 - 8.8.4+inspection+fusion-plugin+Werror
59 - 8.6.5+fusion-plugin
61 - 8.6.5+fusion-plugin
@@ -115,6 +117,10 @@ jobs:
115 cabal_project: cabal.project
117 cabal_project: cabal.project
116 cabal_build_options: "--flag debug --flag -opt"
118 cabal_build_options: "--flag debug --flag -opt"
117 runner: ubuntu-latest
119 runner: ubuntu-latest
120+ - name: 8.10.4+docspec
121+ ghc_version: 8.10.4
122+ doctest: "y"
123+ runner: ubuntu-latest
118
124
119 steps:
125 steps:
120 - uses: actions/checkout@v2
126 - uses: actions/checkout@v2
@@ -141,13 +147,27 @@ jobs:
141
147
142 - name: Run tests
148 - name: Run tests
143 run: |
149 run: |
150+ if test -n "$DOCTEST"
151+ then
152+ mkdir -p $HOME/.cabal/bin
153+ curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz > cabal-docspec.xz
154+ echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
155+ xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
156+ rm -f cabal-docspec.xz
157+ chmod a+x $HOME/.cabal/bin/cabal-docspec
158+ cabal build all
159+ $HOME/.cabal/bin/cabal-docspec --version
160+ $HOME/.cabal/bin/cabal-docspec --timeout 60
144− if test -z "$COVERAGE"
161+ elif test -z "$COVERAGE"
145 then
162 then
146 export TOOLS_DIR=/opt
163 export TOOLS_DIR=/opt
147 # /usr/local/opt/curl/bin for macOS
164 # /usr/local/opt/curl/bin for macOS
148 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
165 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
149 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
166 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
150− else
167+ fi
168+
169+ if test -n "$COVERAGE"
170+ then
151 # Run tests with coverage
171 # Run tests with coverage
152 cabal update
172 cabal update
153 # Build hpc-coveralls if needed
173 # Build hpc-coveralls if needed