diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6a68f52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ +### https://raw.github.com/github/gitignore/master/Go.gitignore + +# Compiled Object files, Static and Dynamic libs (Shared Objects) +*.o +*.a +*.so + +# Folders +_obj +_test + +# Architecture specific extensions/prefixes +*.[568vq] +[568vq].out + +*.cgo1.go +*.cgo2.c +_cgo_defun.c +_cgo_gotypes.go +_cgo_export.* + +_testmain.go + +*.exe +*.test +*.prof + +# Coverage +*.out + +# Test data +data-dir/ diff --git a/Makefile b/Makefile index 2c418c5..02430dc 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,10 @@ -all: build test +all: build test test-all build: go build -v test: + go test -covermode=count -test.short -coverprofile=coverage.out -v + +test-all: go test -covermode=count -coverprofile=coverage.out -v diff --git a/README.md b/README.md index 4e8d5c6..11841c9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ ecc === +[![Circle CI](https://circleci.com/gh/socketplane/ecc.svg?style=svg)](https://circleci.com/gh/socketplane/ecc) [![Coverage Status](https://img.shields.io/coveralls/socketplane/ecc.svg)](https://coveralls.io/r/socketplane/ecc) + Embedded Clustering Client. Currently using Consul. diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..3dae49f --- /dev/null +++ b/circle.yml @@ -0,0 +1,27 @@ +--- +machine: + environment: + DOCKER_IP: "127.0.0.1" + GOPATH: "/home/ubuntu/.go_workspace" + ORG_PATH: "github.com/socketplane" + REPO_PATH: "${ORG_PATH}/ecc" + +dependencies: + override: + - rm -rf ${GOPATH}/src/${REPO_PATH} + - mkdir -p ${GOPATH}/src/${ORG_PATH} + - cp -r ../ecc ${GOPATH}/src/${ORG_PATH} + - mkdir -p ${CIRCLE_ARTIFACTS}/coverage + - go get github.com/mattn/goveralls + +test: + override: + - make build: + pwd: ../.go_workspace/src/${REPO_PATH} + - make test-all: + pwd: ../.go_workspace/src/${REPO_PATH} + post: + - go tool cover -html=coverage.out -o $CIRCLE_ARTIFACTS/coverage/index.html: + pwd: ../.go_workspace/src/${REPO_PATH} + - goveralls -coverprofile=coverage.out -service=circleci -repotoken $COVERALLS_TOKEN: + pwd: ../.go_workspace/src/${REPO_PATH}