dependencies:
  cache_directories:
    - "~/.stack"
  pre:
    - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442
    - echo 'deb http://download.fpcomplete.com/ubuntu precise main'|sudo tee /etc/apt/sources.list.d/fpco.list
    - sudo apt-get update && sudo apt-get install stack -y
    - createuser --superuser --no-password postgrest_test
    - createdb -O postgrest_test -U ubuntu postgrest_test
  override:
    - stack setup
    - stack install hlint packdeps cabal-install

test:
  override:
    - stack test
    - git ls-files | grep '\.l\?hs$' | xargs stack exec -- hlint -X QuasiQuotes "$@"
    - stack exec -- packdeps *.cabal || true
    - stack exec -- cabal check
    - stack haddock
    - stack sdist

dependencies:
  cache_directories:
    - "~/.stack"
  pre:
    - sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 575159689BEFB442
    - echo 'deb http://download.fpcomplete.com/ubuntu precise main'|sudo tee /etc/apt/sources.list.d/fpco.list
    - sudo apt-get update && sudo apt-get install stack -y
    - createuser --superuser --no-password postgrest_test
    - createdb -O postgrest_test -U ubuntu postgrest_test
  override:
    - stack setup
    - stack install hlint packdeps cabal-install

test:
  override:
    - stack test
    - git ls-files | grep '\.l\?hs$' | xargs stack exec -- hlint -X QuasiQuotes "$@"
    - stack exec -- packdeps *.cabal || true
    - stack exec -- cabal check
    - stack haddock --no-haddock-deps
    - stack sdist

Build only haddocks for postgrest, not deps
Build only haddocks for postgrest, not deps
