Skip to content

Commit

Permalink
Merge pull request #6 from wolfgangwalther/ghc98
Browse files Browse the repository at this point in the history
Build with GHC 9.8.1 and modernize CI
  • Loading branch information
nikita-volkov authored Jan 21, 2024
2 parents d605bab + 2abb6d4 commit cff779f
Show file tree
Hide file tree
Showing 7 changed files with 98 additions and 3 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Compile, test and check the docs

on:
workflow_call:

jobs:

check:

strategy:
fail-fast: false
matrix:
include:
- ghc: 8.8.1
ghc-options: ""
ignore-haddock: true
ignore-cabal-check: true
- ghc: latest
ignore-cabal-check: true

runs-on: ubuntu-latest

services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:

- uses: nikita-volkov/build-and-test-cabal-package.github-action@v1
with:
ghc: ${{matrix.ghc}}
ghc-options: ${{matrix.ghc-options}}
ignore-haddock: ${{matrix.ignore-haddock}}
ignore-cabal-check: ${{matrix.ignore-cabal-check}}
17 changes: 17 additions & 0 deletions .github/workflows/on-push-to-master-or-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Compile, test and check the docs

on:
push:
branches:
- master
pull_request:

jobs:

format:
uses: nikita-volkov/haskell-hackage-lib-github-actions-workflows/.github/workflows/format.yaml@v2
secrets: inherit

check:
uses: ./.github/workflows/check.yaml
secrets: inherit
32 changes: 32 additions & 0 deletions .github/workflows/on-push-to-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Release the lib to Hackage

on:
push:
branches:
- supermajor
- major
- minor
- patch

concurrency:
group: release
cancel-in-progress: false

jobs:

format:
uses: nikita-volkov/haskell-hackage-lib-github-actions-workflows/.github/workflows/format.yaml@v2
secrets: inherit

check:
uses: ./.github/workflows/check.yaml
secrets: inherit

release:
needs:
- format
- check
uses: nikita-volkov/haskell-hackage-lib-github-actions-workflows/.github/workflows/release.yaml@v2
secrets: inherit
with:
prefix-tag-with-v: false
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
packages: .
2 changes: 1 addition & 1 deletion hasql-dynamic-statements.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ library
Hasql.DynamicStatements.Snippet.Defs
build-depends:
base >=4.12 && <5,
bytestring >=0.10 && <0.12,
bytestring >=0.10 && <0.13,
containers >=0.6 && <0.7,
hasql >=1.6 && <1.7,
hasql-implicits >=0.1 && <0.2,
Expand Down
2 changes: 1 addition & 1 deletion library/Hasql/DynamicStatements/Prelude.hs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Data.Either as Exports
import Data.Fixed as Exports
import Data.Foldable as Exports hiding (toList)
import Data.Function as Exports hiding (id, (.))
import Data.Functor as Exports
import Data.Functor as Exports hiding (unzip)
import Data.Functor.Contravariant as Exports
import Data.Functor.Identity as Exports
import Data.Int as Exports
Expand Down
2 changes: 1 addition & 1 deletion test/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ withConnection handler =
host = "localhost"
port = 5432
user = "postgres"
password = ""
password = "postgres"
database = "postgres"
use connection =
lift $ handler connection
Expand Down

0 comments on commit cff779f

Please sign in to comment.