diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000000000000000000000000000000000000..9642c9f7254a8963688ca4c7382d367424c38097 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,33 @@ +# Modeled on https://circleci.com/docs/2.0/language-haskell/ +version: 2.1 +jobs: + build: + docker: + - image: "fpco/stack-build:lts" + steps: + - "checkout" + - restore_cache: + # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ + name: "Restore Cached Dependencies" + keys: + - paymentserver-haskell-v1-{{ checksum "stack.yaml" }}-{{ checksum "PaymentServer.cabal" }} + - paymentserver-haskell-v1-{{ checksum "stack.yaml" }} + - run: + name: "Resolve/Update Dependencies" + command: "stack --no-terminal setup" + - run: + name: "Run tests" + command: "stack --no-terminal test --coverage" + - run: + name: "Install executable" + command: "stack --no-terminal install" + - save_cache: + name: "Cache Dependencies" + key: cci-demo-haskell-v1-{{ checksum "stack.yaml" }}-{{ checksum "PaymentServer.cabal" }} + paths: + - "/root/.stack" + - ".stack-work" + - store_artifacts: + # Upload executable + path: "~/.local/bin/PaymentServer-exe" + destination: "PaymentServer-exe"