From 226a4dc11e378a0833e4f24d276ef84e578a2431 Mon Sep 17 00:00:00 2001 From: Andrea Luzzardi Date: Thu, 29 Nov 2018 15:48:40 -0800 Subject: [PATCH] Add CircleCI config Signed-off-by: Andrea Luzzardi --- .circleci/config.yml | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..c3db994 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,47 @@ +version: 2 + +workflows: + version: 2 + build-and-test: + jobs: + - build + - test + +jobs: + build: + docker: + - image: circleci/golang:1.11 + working_directory: /go/src/github.com/blocklayerhq/chainkit + steps: + - checkout + - restore_cache: + keys: + - v1-pkg-cache + - run: + name: Build + command: + go build + - save_cache: + key: v1-pkg-cache + paths: + - "/go/pkg" + test: + docker: + - image: circleci/golang:1.11 + working_directory: /go/src/github.com/blocklayerhq/chainkit + steps: + - checkout + - restore_cache: + keys: + - v1-pkg-cache + - run: + name: Run linter + command: make setup check + - run: + name: Run unit tests + command: + go test -v ./... + - save_cache: + key: v1-pkg-cache + paths: + - "/go/pkg"