Compare commits
No commits in common. "master" and "v0.0.8.0" have entirely different histories.
28
.travis.yml
28
.travis.yml
@ -2,13 +2,9 @@
|
||||
#
|
||||
# haskell-ci '--config=cabal.haskell-ci' 'servant-quickcheck.cabal'
|
||||
#
|
||||
# To regenerate the script (for example after adjusting tested-with) run
|
||||
#
|
||||
# haskell-ci regenerate
|
||||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
# version: 0.10.1
|
||||
# version: 0.9.20200121
|
||||
#
|
||||
version: ~> 1.0
|
||||
language: c
|
||||
@ -36,20 +32,20 @@ before_cache:
|
||||
- rm -rfv $CABALHOME/packages/head.hackage
|
||||
jobs:
|
||||
include:
|
||||
- compiler: ghc-8.8.3
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.3","cabal-install-3.2"]}}
|
||||
- compiler: ghc-8.8.1
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
|
||||
os: linux
|
||||
- compiler: ghc-8.6.5
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.2"]}}
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
|
||||
os: linux
|
||||
- compiler: ghc-8.4.4
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.2"]}}
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
|
||||
os: linux
|
||||
- compiler: ghc-8.2.2
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.2"]}}
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
|
||||
os: linux
|
||||
- compiler: ghc-8.0.2
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.2"]}}
|
||||
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu xenial main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
|
||||
os: linux
|
||||
before_install:
|
||||
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
|
||||
@ -99,8 +95,6 @@ install:
|
||||
- touch cabal.project
|
||||
- |
|
||||
echo "packages: ." >> cabal.project
|
||||
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-quickcheck' >> cabal.project ; fi
|
||||
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
|
||||
- |
|
||||
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-quickcheck)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
||||
- cat cabal.project || true
|
||||
@ -109,8 +103,8 @@ install:
|
||||
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH}
|
||||
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
||||
- rm cabal.project.freeze
|
||||
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
|
||||
- travis_wait 40 ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
|
||||
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} --dep -j2 all
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --dep -j2 all
|
||||
script:
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
# Packaging...
|
||||
@ -126,8 +120,6 @@ script:
|
||||
- touch cabal.project
|
||||
- |
|
||||
echo "packages: ${PKGDIR_servant_quickcheck}" >> cabal.project
|
||||
- if [ $HCNUMVER -ge 80200 ] ; then echo 'package servant-quickcheck' >> cabal.project ; fi
|
||||
- "if [ $HCNUMVER -ge 80200 ] ; then echo ' ghc-options: -Werror=missing-methods' >> cabal.project ; fi"
|
||||
- |
|
||||
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(servant-quickcheck)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
||||
- cat cabal.project || true
|
||||
@ -154,5 +146,5 @@ script:
|
||||
# Constraint set base-compat-0.11
|
||||
- ${CABAL} v2-build $WITHCOMPILER --disable-tests --disable-benchmarks --constraint='base-compat ==0.11.*' all
|
||||
|
||||
# REGENDATA ("0.10.1",["--config=cabal.haskell-ci","servant-quickcheck.cabal"])
|
||||
# REGENDATA ("0.9.20200121",["--config=cabal.haskell-ci","servant-quickcheck.cabal"])
|
||||
# EOF
|
||||
|
||||
@ -1,14 +1,4 @@
|
||||
releases:
|
||||
- version: "0.0.9.0"
|
||||
changes:
|
||||
- description: "Support servant-0.15 (#65)"
|
||||
authors: fizruk
|
||||
date: 2020-06-25
|
||||
|
||||
- description: "Relax constraints for GHC 8.10 (#70)"
|
||||
authors: felixmulder
|
||||
date: 2020-06-20
|
||||
|
||||
- version: "0.0.8.0"
|
||||
changes:
|
||||
- description: Support for servant-0.17
|
||||
|
||||
@ -1,4 +1,2 @@
|
||||
packages: .
|
||||
tests: true
|
||||
|
||||
allow-newer: servant-blaze:servant
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: servant-quickcheck
|
||||
version: 0.0.9.1
|
||||
version: 0.0.8.0
|
||||
synopsis: QuickCheck entire APIs
|
||||
description:
|
||||
This packages provides QuickCheck properties that are tested across an entire
|
||||
@ -13,7 +13,7 @@ category: Web
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
extra-source-files: CHANGELOG.yaml
|
||||
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || == 8.8.3
|
||||
tested-with: GHC ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.5 || == 8.8.1
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
@ -35,28 +35,28 @@ library
|
||||
|
||||
build-depends:
|
||||
aeson >=0.8 && <2
|
||||
, base >=4.9 && <4.15
|
||||
, base >=4.9 && <4.14
|
||||
, base-compat-batteries >=0.10.1 && <0.12
|
||||
, bytestring >=0.10 && <0.11
|
||||
, case-insensitive >=1.2 && <1.3
|
||||
, clock >=0.7 && <0.9
|
||||
, data-default-class >=0.0 && <0.2
|
||||
, hspec >=2.5.6 && <2.8
|
||||
, http-client >=0.4.30 && <0.8
|
||||
, http-client >=0.4.30 && <0.7
|
||||
, http-media >=0.6 && <0.9
|
||||
, http-types >=0.8 && <0.13
|
||||
, mtl >=2.1 && <2.3
|
||||
, pretty >=1.1 && <1.2
|
||||
, process >=1.2 && <1.7
|
||||
, QuickCheck >=2.7 && <2.15
|
||||
, servant >=0.17 && <0.19
|
||||
, servant-client >=0.17 && <0.19
|
||||
, servant-server >=0.17 && <0.19
|
||||
, QuickCheck >=2.7 && <2.14
|
||||
, servant >=0.17 && <0.18
|
||||
, servant-client >=0.17 && <0.18
|
||||
, servant-server >=0.17 && <0.18
|
||||
, split >=0.2 && <0.3
|
||||
, string-conversions >=0.3 && <0.5
|
||||
, temporary >=1.2 && <1.4
|
||||
, text >=1 && <2
|
||||
, time >=1.5 && <1.11
|
||||
, time >=1.5 && <1.10
|
||||
, warp >=3.2.4 && <3.4
|
||||
|
||||
if !impl(ghc >=8.0)
|
||||
|
||||
@ -11,9 +11,6 @@ import Network.Wai.Handler.Warp (withApplication)
|
||||
import Prelude.Compat
|
||||
import Servant (Context (EmptyContext), HasServer,
|
||||
Server, serveWithContext)
|
||||
#if MIN_VERSION_servant_server(0,18,0)
|
||||
import Servant (DefaultErrorFormatters, ErrorFormatters, HasContextEntry, type (.++))
|
||||
#endif
|
||||
import Servant.Client (BaseUrl (..), Scheme (..))
|
||||
import System.IO.Unsafe (unsafePerformIO)
|
||||
import Test.Hspec (Expectation, expectationFailure)
|
||||
@ -40,11 +37,7 @@ withServantServer api = withServantServerAndContext api EmptyContext
|
||||
-- application.
|
||||
--
|
||||
-- /Since 0.0.0.0/
|
||||
#if MIN_VERSION_servant_server(0,18,0)
|
||||
withServantServerAndContext :: (HasServer a ctx, HasContextEntry (ctx .++ DefaultErrorFormatters) ErrorFormatters)
|
||||
#else
|
||||
withServantServerAndContext :: HasServer a ctx
|
||||
#endif
|
||||
=> Proxy a -> Context ctx -> IO (Server a) -> (BaseUrl -> IO r) -> IO r
|
||||
withServantServerAndContext api ctx server t
|
||||
= withApplication (return . serveWithContext api ctx =<< server) $ \port ->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user