This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from MangoIV/mangoiv/newser-servant-base-ghc
[feat] fix build with recent servant versions
- Loading branch information
Showing
16 changed files
with
484 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake . -Lv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: haskell ci | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
generate-matrix: | ||
name: "Generate matrix from cabal" | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Extract the tested GHC versions | ||
id: set-matrix | ||
uses: kleidukos/get-tested@v0.1.7.0 | ||
with: | ||
cabal-file: servant-quickcheck.cabal | ||
ubuntu-version: latest | ||
macos-version: latest | ||
windows-version: latest | ||
version: 0.1.7.0 | ||
tests: | ||
name: ${{ matrix.ghc }} on ${{ matrix.os }} | ||
needs: generate-matrix | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: haskell-actions/setup@v2 | ||
id: setup-haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
- name: Cache | ||
uses: actions/cache@v4.0.1 | ||
with: | ||
path: ${{ steps.setup-haskell.outputs.cabal-store }} | ||
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}-cabal-${{ hashFiles('**/plan.json') }} | ||
restore-keys: ${{ matrix.os }}-ghc-${{ matrix.ghc }}- | ||
- run: cabal test all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: nix ci | ||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
permissions: | ||
contents: read | ||
id-token: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
- run: nix -L flake check | ||
- run: nix -L build .#servant-quickcheck | ||
- run: nix -L build .#ghc94-servant-quickcheck | ||
- run: nix -L build .#ghc98-servant-quickcheck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,7 @@ samples/ | |
test-servers/ | ||
/doc/ | ||
.stack-work/ | ||
.pre-commit-config.yaml | ||
.direnv | ||
dist* | ||
result* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
packages: . | ||
packages: | ||
./. | ||
|
||
-- due to a bug in the nixpkgs haskell infrastructure (or cabal, if you will) | ||
-- it is impossible to provided hspec-discover in a devShell therefore having | ||
-- to resort to downloads from hackage | ||
repository hackage.haskell.org | ||
url: http://hackage.haskell.org/ | ||
|
||
tests: true | ||
|
||
allow-newer: servant-blaze:servant | ||
|
||
test-show-details: direct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,54 @@ | ||
-- Initial posts.cabal generated by cabal init. For further documentation, | ||
-- see http://haskell.org/cabal/users-guide/ | ||
name: posts | ||
version: 0.1.0.0 | ||
|
||
name: posts | ||
version: 0.1.0.0 | ||
-- synopsis: | ||
-- description: | ||
license: BSD3 | ||
license-file: LICENSE | ||
author: Julian K. Arni | ||
maintainer: jkarni@gmail.com | ||
license: BSD3 | ||
license-file: LICENSE | ||
author: Julian K. Arni | ||
maintainer: jkarni@gmail.com | ||
|
||
-- copyright: | ||
-- category: | ||
build-type: Simple | ||
build-type: Simple | ||
|
||
-- extra-source-files: | ||
cabal-version: >=1.10 | ||
cabal-version: >=1.10 | ||
|
||
executable posts | ||
main-is: Main.hs | ||
build-depends: base >=4.8 && <4.9 | ||
, servant-server >=0.5 && <0.8 | ||
, aeson >=0.9 && <0.12 | ||
, text == 1.* | ||
, warp >=3.0 && <3.3 | ||
, transformers >=0.4 && <0.5 | ||
, postgresql-simple | ||
hs-source-dirs: src | ||
ghc-options: -Wall -O2 -threaded | ||
default-language: Haskell2010 | ||
main-is: Main.hs | ||
build-depends: | ||
aeson >=0.9 && <0.12 | ||
, base >=4.8 && <4.9 | ||
, postgresql-simple | ||
, servant-server >=0.5 && <0.8 | ||
, text >=1 && <2 | ||
, transformers >=0.4 && <0.5 | ||
, warp >=3.0 && <3.3 | ||
|
||
hs-source-dirs: src | ||
ghc-options: -Wall -O2 -threaded | ||
default-language: Haskell2010 | ||
|
||
test-suite spec | ||
type: exitcode-stdio-1.0 | ||
ghc-options: -Wall -O2 -threaded | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
main-is: Spec.hs | ||
build-depends: base == 4.* | ||
, servant-quickcheck | ||
, hspec == 2.* | ||
, servant-server >=0.5 && <0.8 | ||
, aeson >=0.9 && <0.12 | ||
, text == 1.* | ||
, warp >=3.0 && <3.3 | ||
, transformers >=0.4 && <0.5 | ||
, postgresql-simple | ||
, quickcheck-instances | ||
, QuickCheck | ||
type: exitcode-stdio-1.0 | ||
ghc-options: -Wall -O2 -threaded | ||
default-language: Haskell2010 | ||
hs-source-dirs: src | ||
main-is: Spec.hs | ||
|
||
-- Initial posts.cabal generated by cabal init. For further documentation, | ||
-- see http://haskell.org/cabal/users-guide/ | ||
|
||
build-depends: | ||
aeson >=0.9 && <0.12 | ||
, base >=4 && <5 | ||
, hspec >=2 && <3 | ||
, postgresql-simple | ||
, QuickCheck | ||
, quickcheck-instances | ||
, servant-quickcheck | ||
, servant-server >=0.5 && <0.8 | ||
, text >=1 && <2 | ||
, transformers >=0.4 && <0.5 | ||
, warp >=3.0 && <3.3 |
Oops, something went wrong.