diff --git a/Makefile b/Makefile index 4ae53da9..a6229a8e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all test test-local install-deps lint fmt vet +.PHONY: all test test-local test-ci install-deps lint fmt vet all: test @@ -9,6 +9,10 @@ test-local: install-deps fmt lint vet test: @docker-compose run --rm test +# Because CircleCI fails to rm a container +test-ci: + @docker-compose run test + install-deps: @echo "+ $@" @go get -u github.com/golang/lint/golint diff --git a/circle.yml b/circle.yml index 67bae7d3..dcfeaaac 100644 --- a/circle.yml +++ b/circle.yml @@ -2,36 +2,11 @@ machine: services: - docker - environment: - DOCKER_IP: "127.0.0.1" - GOPATH: "/home/ubuntu/.go_workspace" - ORG_PATH: "github.com/socketplane" - REPO_PATH: "${ORG_PATH}/libovsdb" dependencies: override: - - rm -rf ${GOPATH}/src/${REPO_PATH} - - mkdir -p ${GOPATH}/src/${ORG_PATH} - - cp -r ../libovsdb ${GOPATH}/src/${ORG_PATH} - - mkdir -p ${CIRCLE_ARTIFACTS}/coverage - - go get github.com/mattn/goveralls + - echo "Nothing to see here.." - post: - - sudo pip install -qq fig: - pwd: ../.go_workspace/src/${REPO_PATH} - - fig up -d: - pwd: ../.go_workspace/src/${REPO_PATH} test: override: - - make build: - pwd: ../.go_workspace/src/${REPO_PATH} - - make test-all: - pwd: ../.go_workspace/src/${REPO_PATH} - post: - - fig stop: - pwd: ../.go_workspace/src/${REPO_PATH} - - 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} - + - make test-ci