diff --git a/Makefile b/Makefile index 47b8410a..f2ceefbb 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,8 @@ else $(WEAVER_EXE) $(WEAVEPROXY_EXE): ifeq ($(COVERAGE),true) - $(eval COVERAGE_MODULES := $(shell (go list ./$(@D); go list -f '{{join .Deps "\n"}}' ./$(@D) | grep "^$(PACKAGE_BASE)/") | paste -s -d,)) + go build -v $(BUILD_FLAGS) -o $@ ./$(@D) + $(eval COVERAGE_MODULES := $(shell (go list ./$(@D); go list -f '{{join .Deps "\n"}}' ./$(@D) | grep "^$(PACKAGE_BASE)/") | grep -v "^$(PACKAGE_BASE)/vendor/" | paste -s -d,)) go test -c -o ./$@ $(BUILD_FLAGS) -v -covermode=atomic -coverpkg $(COVERAGE_MODULES) ./$(@D)/ else go build $(BUILD_FLAGS) -o $@ ./$(@D) diff --git a/circle.yml b/circle.yml index 166e1bdb..28a61935 100644 --- a/circle.yml +++ b/circle.yml @@ -14,6 +14,8 @@ machine: CLOUDSDK_CORE_DISABLE_PROMPTS: 1 dependencies: + cache_directories: + - "~/docker" post: - "sudo apt-get update && sudo apt-get install bc jq" - curl https://sdk.cloud.google.com | bash @@ -37,10 +39,6 @@ test: - cd $SRCDIR/test; eval $(./gce.sh hosts); export COVERAGE=true; ./run_all.sh: parallel: true timeout: 300 - - cd $SRCDIR; make clean-bin: - parallel: true - - cd $SRCDIR; make RM=: - parallel: true post: - cd $SRCDIR/test; ./gce.sh destroy: parallel: true @@ -60,4 +58,5 @@ deployment: owner: weaveworks commands: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS + - cd $SRCDIR; make clean-bin - cd $SRCDIR; make publish