mirror of
https://github.com/ilyakooo0/servant-quickcheck.git
synced 2024-11-22 05:42:11 +03:00
Merge pull request #62 from haskell-servant/servant-0.16
Allow servant-0.16
This commit is contained in:
commit
638580ba49
93
.travis.yml
93
.travis.yml
@ -1,11 +1,11 @@
|
||||
# This Travis job script has been generated by a script via
|
||||
#
|
||||
# runghc make_travis_yml_2.hs '--branch' 'master' '-o' '.travis.yml' 'servant-quickcheck.cabal'
|
||||
# haskell-ci '--branches' 'master' '-o' '.travis.yml' 'servant-quickcheck.cabal'
|
||||
#
|
||||
# For more information, see https://github.com/haskell-CI/haskell-ci
|
||||
#
|
||||
language: c
|
||||
sudo: false
|
||||
dist: xenial
|
||||
|
||||
git:
|
||||
submodules: false # whether to recursively clone submodules
|
||||
@ -20,68 +20,68 @@ cache:
|
||||
- $HOME/.cabal/store
|
||||
|
||||
before_cache:
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
|
||||
# remove files that are regenerated by 'cabal update'
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
|
||||
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
|
||||
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
|
||||
|
||||
- rm -rfv $HOME/.cabal/packages/head.hackage
|
||||
- rm -rfv $CABALHOME/packages/head.hackage
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- compiler: "ghc-8.6.1"
|
||||
# env: TEST=--disable-tests BENCH=--disable-benchmarks
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.6.3"
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.4.4"
|
||||
# env: TEST=--disable-tests BENCH=--disable-benchmarks
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.2.2"
|
||||
# env: TEST=--disable-tests BENCH=--disable-benchmarks
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-8.0.2"
|
||||
# env: TEST=--disable-tests BENCH=--disable-benchmarks
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
|
||||
- compiler: "ghc-7.10.3"
|
||||
# env: TEST=--disable-tests BENCH=--disable-benchmarks
|
||||
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
|
||||
|
||||
before_install:
|
||||
- HC=${CC}
|
||||
- HC=/opt/ghc/bin/${CC}
|
||||
- HCVER=$(echo "$TRAVIS_COMPILER" | sed 's/ghc-//')
|
||||
- echo $HCVER
|
||||
- HCPKG=${HC/ghc/ghc-pkg}
|
||||
- unset CC
|
||||
- CABAL=/opt/ghc/bin/cabal
|
||||
- CABALHOME=$HOME/.cabal
|
||||
- export PATH="$CABALHOME/bin:$PATH"
|
||||
- ROOTDIR=$(pwd)
|
||||
- mkdir -p $HOME/.local/bin
|
||||
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
|
||||
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
|
||||
- echo $HCNUMVER
|
||||
|
||||
install:
|
||||
- cabal --version
|
||||
- ${CABAL} --version
|
||||
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||
- BENCH=${BENCH---enable-benchmarks}
|
||||
- TEST=${TEST---enable-tests}
|
||||
- HADDOCK=${HADDOCK-true}
|
||||
- UNCONSTRAINED=${UNCONSTRAINED-true}
|
||||
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
|
||||
- TEST=--enable-tests
|
||||
- BENCH=--enable-benchmarks
|
||||
- GHCHEAD=${GHCHEAD-false}
|
||||
- travis_retry cabal update -v
|
||||
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
|
||||
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export CABALHOME=$APPDATA/cabal; else export CABALHOME=$HOME/.cabal; fi
|
||||
- travis_retry ${CABAL} update -v
|
||||
- sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
|
||||
- rm -fv cabal.project cabal.project.local
|
||||
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
|
||||
- "printf 'packages: \".\"\\n' > cabal.project"
|
||||
- grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
|
||||
- rm -f cabal.project
|
||||
- touch cabal.project
|
||||
- "printf 'packages: \".\"\\n' >> cabal.project"
|
||||
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
|
||||
- touch cabal.project.local
|
||||
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant-quickcheck | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
|
||||
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-quickcheck)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
||||
- cat cabal.project || true
|
||||
- cat cabal.project.local || true
|
||||
- if [ -f "./configure.ac" ]; then
|
||||
(cd "." && autoreconf -i);
|
||||
fi
|
||||
- if [ -f "./configure.ac" ]; then (cd "." && autoreconf -i); fi
|
||||
- rm -f cabal.project.freeze
|
||||
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
|
||||
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
|
||||
- ${CABAL} new-freeze -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dry
|
||||
- "cat \"cabal.project.freeze\" | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
||||
- rm "cabal.project.freeze"
|
||||
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
|
||||
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
|
||||
- rm -rf .ghc.environment.* "."/dist
|
||||
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
||||
|
||||
@ -89,30 +89,33 @@ install:
|
||||
# any command which exits with a non-zero exit code causes the build to fail.
|
||||
script:
|
||||
# test that source-distributions can be generated
|
||||
- cabal new-sdist all
|
||||
- ${CABAL} new-sdist all
|
||||
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
|
||||
- cd ${DISTDIR} || false
|
||||
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
|
||||
- "printf 'packages: servant-quickcheck-*/*.cabal\\n' > cabal.project"
|
||||
- rm -f cabal.project
|
||||
- touch cabal.project
|
||||
- "printf 'packages: \"servant-quickcheck-*/*.cabal\"\\n' >> cabal.project"
|
||||
- "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
|
||||
- touch cabal.project.local
|
||||
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant-quickcheck | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
|
||||
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | grep -vE -- '^(servant-quickcheck)$' | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
||||
- cat cabal.project || true
|
||||
- cat cabal.project.local || true
|
||||
# this builds all libraries and executables (without tests/benchmarks)
|
||||
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
|
||||
- ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all
|
||||
|
||||
# build & run tests, build benchmarks
|
||||
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
|
||||
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
|
||||
- ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
|
||||
- if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
|
||||
|
||||
# cabal check
|
||||
- (cd servant-quickcheck-* && cabal check)
|
||||
- (cd servant-quickcheck-* && ${CABAL} check)
|
||||
|
||||
# haddock
|
||||
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
|
||||
- ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
|
||||
|
||||
# Build without installed constraints for packages in global-db
|
||||
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
|
||||
- rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all;
|
||||
|
||||
# REGENDATA ["--branch","master","-o",".travis.yml","servant-quickcheck.cabal"]
|
||||
# REGENDATA ["--branches","master","-o",".travis.yml","servant-quickcheck.cabal"]
|
||||
# EOF
|
||||
|
@ -1,29 +1,22 @@
|
||||
name: servant-quickcheck
|
||||
version: 0.0.7.3
|
||||
synopsis: QuickCheck entire APIs
|
||||
name: servant-quickcheck
|
||||
version: 0.0.7.3
|
||||
synopsis: QuickCheck entire APIs
|
||||
description:
|
||||
This packages provides QuickCheck properties that are tested across an entire
|
||||
API.
|
||||
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Julian K. Arni
|
||||
maintainer: jkarni@gmail.com
|
||||
category: Web
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
extra-source-files:
|
||||
CHANGELOG.yaml
|
||||
tested-with:
|
||||
GHC ==7.10.3
|
||||
|| ==8.0.2
|
||||
|| ==8.2.2
|
||||
|| ==8.4.4
|
||||
|| ==8.6.1
|
||||
This packages provides QuickCheck properties that are tested across an entire
|
||||
API.
|
||||
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Julian K. Arni
|
||||
maintainer: jkarni@gmail.com
|
||||
category: Web
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
extra-source-files: CHANGELOG.yaml
|
||||
tested-with: GHC ==7.10.3 || ==8.0.2 || ==8.2.2 || ==8.4.4 || ==8.6.3
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
type: git
|
||||
location: https://github.com/haskell-servant/servant-quickcheck
|
||||
|
||||
flag long-tests
|
||||
@ -31,108 +24,115 @@ flag long-tests
|
||||
default: False
|
||||
|
||||
library
|
||||
exposed-modules: Servant.QuickCheck
|
||||
, Servant.QuickCheck.Internal
|
||||
, Servant.QuickCheck.Internal.Predicates
|
||||
, Servant.QuickCheck.Internal.HasGenRequest
|
||||
, Servant.QuickCheck.Internal.QuickCheck
|
||||
, Servant.QuickCheck.Internal.Equality
|
||||
, Servant.QuickCheck.Internal.ErrorTypes
|
||||
build-depends: base >=4.8 && <4.13
|
||||
, base-compat-batteries >= 0.10.1 && <0.11
|
||||
, aeson > 0.8 && < 2
|
||||
, bytestring == 0.10.*
|
||||
, case-insensitive == 1.2.*
|
||||
, clock >= 0.7 && < 0.8
|
||||
, data-default-class >= 0.0 && < 0.2
|
||||
, hspec >= 2.5.6 && < 2.6
|
||||
exposed-modules:
|
||||
Servant.QuickCheck
|
||||
Servant.QuickCheck.Internal
|
||||
Servant.QuickCheck.Internal.Equality
|
||||
Servant.QuickCheck.Internal.ErrorTypes
|
||||
Servant.QuickCheck.Internal.HasGenRequest
|
||||
Servant.QuickCheck.Internal.Predicates
|
||||
Servant.QuickCheck.Internal.QuickCheck
|
||||
|
||||
, http-client >= 0.4.30 && < 0.6
|
||||
, http-media >= 0.6 && <0.8
|
||||
, http-types > 0.8 && < 0.13
|
||||
, mtl > 2.1 && < 2.3
|
||||
, pretty == 1.1.*
|
||||
, process >= 1.2 && < 1.7
|
||||
, QuickCheck > 2.7 && < 2.13
|
||||
, servant >= 0.13 && < 0.15
|
||||
, servant-client >= 0.13 && < 0.15
|
||||
, servant-server >= 0.13 && < 0.15
|
||||
, split == 0.2.*
|
||||
, string-conversions > 0.3 && < 0.5
|
||||
, temporary >= 1.2 && <1.4
|
||||
, text == 1.*
|
||||
, time >= 1.5 && < 1.9
|
||||
, warp >= 3.2.4 && < 3.3
|
||||
build-depends:
|
||||
aeson >=0.8 && <2
|
||||
, base >=4.8 && <4.13
|
||||
, base-compat-batteries >=0.10.1 && <0.11
|
||||
, bytestring >=0.10 && <0.11
|
||||
, case-insensitive >=1.2 && <1.3
|
||||
, clock >=0.7 && <0.8
|
||||
, data-default-class >=0.0 && <0.2
|
||||
, hspec >=2.5.6 && <2.8
|
||||
, http-client >=0.4.30 && <0.7
|
||||
, http-media >=0.6 && <0.8
|
||||
, 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.13
|
||||
, servant >=0.13 && <0.15
|
||||
, servant-client >=0.13 && <0.15
|
||||
, servant-server >=0.13 && <0.15
|
||||
, split >=0.2 && <0.3
|
||||
, string-conversions >=0.3 && <0.5
|
||||
, temporary >=1.2 && <1.4
|
||||
, text >=1 && <2
|
||||
, time >=1.5 && <1.9
|
||||
, warp >=3.2.4 && <3.3
|
||||
|
||||
if !impl(ghc >= 8.0)
|
||||
build-depends:
|
||||
semigroups >= 0.18.3 && <0.19
|
||||
if !impl(ghc >=8.0)
|
||||
build-depends: semigroups >=0.18.3 && <0.19
|
||||
|
||||
hs-source-dirs: src
|
||||
default-extensions: TypeOperators
|
||||
, FlexibleInstances
|
||||
, FlexibleContexts
|
||||
, DataKinds
|
||||
, GADTs
|
||||
, MultiParamTypeClasses
|
||||
, DeriveFunctor
|
||||
, KindSignatures
|
||||
, RankNTypes
|
||||
, ConstraintKinds
|
||||
, DeriveGeneric
|
||||
, ScopedTypeVariables
|
||||
, OverloadedStrings
|
||||
, FunctionalDependencies
|
||||
, NoImplicitPrelude
|
||||
, DeriveDataTypeable
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: src
|
||||
default-extensions:
|
||||
NoImplicitPrelude
|
||||
ConstraintKinds
|
||||
DataKinds
|
||||
DeriveDataTypeable
|
||||
DeriveFunctor
|
||||
DeriveGeneric
|
||||
FlexibleContexts
|
||||
FlexibleInstances
|
||||
FunctionalDependencies
|
||||
GADTs
|
||||
KindSignatures
|
||||
MultiParamTypeClasses
|
||||
OverloadedStrings
|
||||
RankNTypes
|
||||
ScopedTypeVariables
|
||||
TypeOperators
|
||||
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite spec
|
||||
type: exitcode-stdio-1.0
|
||||
ghc-options: -Wall -threaded
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: test
|
||||
main-is: Spec.hs
|
||||
other-modules: Servant.QuickCheck.InternalSpec
|
||||
build-tool-depends: hspec-discover:hspec-discover
|
||||
build-depends: base
|
||||
, base-compat-batteries
|
||||
, aeson
|
||||
, servant-quickcheck
|
||||
, bytestring
|
||||
, hspec
|
||||
, hspec-core >= 2.5.5 && < 2.6
|
||||
, http-client
|
||||
, blaze-html
|
||||
, warp
|
||||
, servant-server
|
||||
, servant-client
|
||||
, servant
|
||||
, servant-blaze
|
||||
, transformers
|
||||
, QuickCheck
|
||||
, quickcheck-io
|
||||
default-extensions: TypeOperators
|
||||
, FlexibleInstances
|
||||
, FlexibleContexts
|
||||
, GADTs
|
||||
, DataKinds
|
||||
, NoImplicitPrelude
|
||||
, OverloadedStrings
|
||||
, ScopedTypeVariables
|
||||
type: exitcode-stdio-1.0
|
||||
ghc-options: -Wall -threaded
|
||||
default-language: Haskell2010
|
||||
hs-source-dirs: test
|
||||
main-is: Spec.hs
|
||||
other-modules: Servant.QuickCheck.InternalSpec
|
||||
build-tool-depends: hspec-discover:hspec-discover -any
|
||||
build-depends:
|
||||
aeson
|
||||
, base
|
||||
, base-compat-batteries
|
||||
, blaze-html
|
||||
, bytestring
|
||||
, hspec
|
||||
, hspec-core >=2.5.5 && <2.8
|
||||
, http-client
|
||||
, QuickCheck
|
||||
, quickcheck-io
|
||||
, servant
|
||||
, servant-blaze
|
||||
, servant-client
|
||||
, servant-quickcheck
|
||||
, servant-server
|
||||
, transformers
|
||||
, warp
|
||||
|
||||
default-extensions:
|
||||
NoImplicitPrelude
|
||||
DataKinds
|
||||
FlexibleContexts
|
||||
FlexibleInstances
|
||||
GADTs
|
||||
OverloadedStrings
|
||||
ScopedTypeVariables
|
||||
TypeOperators
|
||||
|
||||
if flag(long-tests)
|
||||
cpp-options: -DLONG_TESTS
|
||||
cpp-options: -DLONG_TESTS
|
||||
|
||||
test-suite example
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Main.hs
|
||||
hs-source-dirs:
|
||||
example
|
||||
ghc-options: -Wall
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Main.hs
|
||||
hs-source-dirs: example
|
||||
ghc-options: -Wall
|
||||
build-depends:
|
||||
base
|
||||
, hspec
|
||||
, servant-server
|
||||
, servant-quickcheck
|
||||
, servant-server
|
||||
, text
|
||||
|
||||
default-language: Haskell2010
|
||||
|
Loading…
Reference in New Issue
Block a user