Skip to content

Commit

Permalink
run all test command in one docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
phamhongviet committed May 1, 2016
1 parent ab5a469 commit 3e63f63
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ setup-test:
test -f $(TEST_CONTAINER_IDS_FILE) || ./setup-test.sh > $(TEST_CONTAINER_IDS_FILE)

test: setup-test get-deps
docker run --rm -v $(GOPATH):/go -v $(PWD):/app -w /app $(GOLANG_IMAGE) gofmt -d .
docker run --rm -v $(GOPATH):/go -v $(PWD):/app -w /app $(GOLANG_IMAGE) golint ./...
docker run --rm -v $(GOPATH):/go -v $(PWD):/app -w /app --link `head -n 1 $(TEST_CONTAINER_IDS_FILE)`:serf --link `sed '2q;d' $(TEST_CONTAINER_IDS_FILE)`:serf-auth $(GOLANG_IMAGE) go test
docker run --rm -v $(GOPATH):/go -v $(PWD):/app -w /app --link `head -n 1 $(TEST_CONTAINER_IDS_FILE)`:serf --link `sed '2q;d' $(TEST_CONTAINER_IDS_FILE)`:serf-auth $(GOLANG_IMAGE) sh -c "gofmt -d . && golint ./... && go test"

build: get-deps
docker run --rm -v $(GOPATH):/go -v $(PWD):/app -w /app -e CGO_ENABLED=0 $(GOLANG_IMAGE) go build -ldflags "-s" -a -installsuffix cgo -o serf-dns
Expand Down

0 comments on commit 3e63f63

Please sign in to comment.