From 57a6f3b0024b4d23420ac6027b2919b768237900 Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Mon, 9 Sep 2019 10:59:21 -0400 Subject: [PATCH] Try out a CircleCI configuration --- .circleci/config.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..9642c9f --- /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" -- GitLab