Skip to content

Commit 988b31d

Browse files
committed
Combine workflows into one
1 parent a61fe4a commit 988b31d

File tree

2 files changed

+13
-49
lines changed

2 files changed

+13
-49
lines changed

.github/workflows/haddock-pages.yml renamed to .github/workflows/haskell-ci.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish API docs
1+
name: Test and Publish API docs
22

33
on: [push, pull_request, workflow_dispatch]
44

@@ -8,16 +8,10 @@ env:
88

99
jobs:
1010

11-
haddock:
11+
build_test_doc:
1212
runs-on: ubuntu-latest
1313
steps:
1414

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-
2115
- name: Checkout repository content
2216
uses: actions/checkout@v4
2317

@@ -31,8 +25,16 @@ jobs:
3125
key: cabal-${{ hashFiles('**/*.cabal', '**/*.cabal.project', '**/*.cabal.project.freeze') }}
3226
restore-keys: cabal-
3327

34-
- name: Prepare cabal
35-
run: cabal update
28+
- name: Install dependencies
29+
run: |
30+
cabal update
31+
cabal build --only-dependencies --enable-tests --enable-benchmarks
32+
33+
- name: Build project
34+
run: cabal build --enable-tests --enable-benchmarks all
35+
36+
- name: Run tests
37+
run: cabal test --test-show-details=streaming
3638

3739
- name: Generate haddock API docs
3840
run: cabal haddock --builddir=haddock_build --haddock-hyperlinked-source --haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
@@ -52,7 +54,7 @@ jobs:
5254
path: ${{ env.HADDOCK_DIR }}
5355

5456
deploy:
55-
needs: haddock
57+
needs: build_test_doc
5658
if: github.ref == 'refs/heads/main'
5759
runs-on: ubuntu-latest
5860
permissions:

.github/workflows/test.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)