diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..7cd53f6 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,32 @@ +version: 2 +jobs: + build: + docker: + # GHC 8.0.2 is the lowest (and so far, only) supported compiler version. + - image: fpco/stack-build:lts-9.21 + steps: + - checkout + - restore_cache: + keys: + - stack-ghc-{{ checksum "stack.yaml" }} + - restore_cache: + keys: + - stack-deps-{{ checksum "package.yaml" }} + - run: + name: Set up Stack + command: stack setup --no-terminal --no-reinstall + - save_cache: + key: stack-ghc-{{ checksum "stack.yaml" }} + paths: + - /root/.stack + - run: + name: Install dependencies + command: stack build --skip-ghc-check --no-terminal --test --only-dependencies + - save_cache: + key: stack-deps-{{ checksum "package.yaml" }} + paths: + - /root/.stack + - .stack-work + - run: + name: Tests + command: stack test --skip-ghc-check --no-terminal diff --git a/circle.yml b/circle.yml deleted file mode 100644 index d182dcb..0000000 --- a/circle.yml +++ /dev/null @@ -1,22 +0,0 @@ -dependencies: - cache_directories: - - "~/.cabal" - - "~/.local" - - "~/.stack" - - ".stack-work" - pre: - - wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/ubuntu/fpco.key | sudo apt-key add - - - echo 'deb http://download.fpcomplete.com/ubuntu/trusty stable main'|sudo tee /etc/apt/sources.list.d/fpco.list - - sudo apt-get update - - sudo apt-get install -y stack - override: - - stack --no-terminal setup - - stack --no-terminal build --haddock --test --only-dependencies -j1 - -test: - override: - - stack --no-terminal build --test --pedantic - - stack --no-terminal test - - stack --no-terminal haddock - post: - - mv .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/doc/html/graphql-api $CIRCLE_ARTIFACTS/ diff --git a/stack.yaml b/stack.yaml index 27ac9a4..057807e 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,8 +1,10 @@ -resolver: nightly-2017-01-25 +# GHC 8.0.2 is the lowest (and currently, only) supported compiler version. +resolver: lts-9.21 packages: - "." - "./docs/source/tutorial" - "./graphql-wai" -extra-deps: [protolude-0.2] +extra-deps: + - protolude-0.2