Skip to content

Commit 599058d

Browse files
committed
Combine workflows into one
1 parent a61fe4a commit 599058d

File tree

2 files changed

+15
-49
lines changed

2 files changed

+15
-49
lines changed

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

Lines changed: 15 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,11 @@ env:
88

99
jobs:
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

@@ -31,8 +26,16 @@ jobs:
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'
@@ -52,7 +55,8 @@ jobs:
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:

.github/workflows/test.yml

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

0 commit comments

Comments
 (0)