diff --git a/circle.yml b/circle.yml index 19aafe43d..84c32bb12 100644 --- a/circle.yml +++ b/circle.yml @@ -4,6 +4,12 @@ machine: - createdb -O postgrest_test -U ubuntu postgrest_test ghc: version: 7.8.3 +dependencies: + override: + - cabal update + - cabal sandbox init + - cabal install --upgrade-dependencies --constraint="template-haskell installed" --dependencies-only --enable-tests + - cabal configure --enable-tests -f ci test: post: - cabal exec hlint -- -X QuasiQuotes src/**/*.hs test/**/*.hs diff --git a/postgrest.cabal b/postgrest.cabal index f7e6651f6..702d27b3b 100644 --- a/postgrest.cabal +++ b/postgrest.cabal @@ -12,6 +12,14 @@ maintainer: cred+github@begriffs.com category: Web build-type: Simple cabal-version: >=1.10 +source-repository head + type: git + location: git://github.com/begriffs/postgrest.git + +Flag CI + Description: No warnings allowed in continuous integration + Manual: True + Default: False executable postgrest main-is: PostgREST/Main.hs @@ -47,7 +55,11 @@ executable postgrest hs-source-dirs: src library - ghc-options: -Wall -W -O2 + if flag(ci) + ghc-options: -Wall -W -Werror + else + ghc-options: -Wall -W -O2 + default-language: Haskell2010 default-extensions: OverloadedStrings, ScopedTypeVariables, QuasiQuotes build-depends: base >=4.6 && <5 @@ -91,7 +103,10 @@ Test-Suite spec Default-Language: Haskell2010 default-extensions: OverloadedStrings, ScopedTypeVariables, QuasiQuotes Hs-Source-Dirs: test, src - ghc-options: -Wall -W -Werror + if flag(ci) + ghc-options: -Wall -W -Werror + else + ghc-options: -Wall -W -O2 Main-Is: Main.hs Other-Modules: PostgREST.App , PostgREST.Auth