File tree Expand file tree Collapse file tree 2 files changed +15
-49
lines changed Expand file tree Collapse file tree 2 files changed +15
-49
lines changed Original file line number Diff line number Diff line change 1- name : Publish API docs
1+ name : Test and Publish API docs
22
33on : [push, pull_request, workflow_dispatch]
44
88
99jobs :
1010
11- haddock :
11+ build_test_doc :
12+ name : Build, Test, and generate API docs
1213 runs-on : ubuntu-latest
1314 steps :
1415
15- - name : Set up haskell
16- uses : haskell-actions/setup@v2
17- with :
18- ghc-version : ' 9.2.7'
19- cabal-version : ' 3.6.2.0'
20-
2116 - name : Checkout repository content
2217 uses : actions/checkout@v4
2318
3126 key : cabal-${{ hashFiles('**/*.cabal', '**/*.cabal.project', '**/*.cabal.project.freeze') }}
3227 restore-keys : cabal-
3328
34- - name : Prepare cabal
35- run : cabal update
29+ - name : Install dependencies
30+ run : |
31+ cabal update
32+ cabal build --only-dependencies --enable-tests --enable-benchmarks
33+
34+ - name : Build project
35+ run : cabal build --enable-tests --enable-benchmarks all
36+
37+ - name : Run tests
38+ run : cabal test --test-show-details=streaming
3639
3740 - name : Generate haddock API docs
3841 run : cabal haddock --builddir=haddock_build --haddock-hyperlinked-source --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
5255 path : ${{ env.HADDOCK_DIR }}
5356
5457 deploy :
55- needs : haddock
58+ name : Deploy API docs to GitHub Pages
59+ needs : build_test_doc
5660 if : github.ref == 'refs/heads/main'
5761 runs-on : ubuntu-latest
5862 permissions :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments