Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tidy up makefile, add mongo shell command
- Loading branch information
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,39 @@ | ||
default: services test | ||
|
||
.PHONY: test | ||
test: | ||
go test ./... | ||
.PHONY: test | ||
|
||
.PHONY: test_docker | ||
test_docker: | ||
docker-compose run --rm golang make test | ||
.PHONY: test_docker | ||
|
||
.PHONY: cover | ||
cover: | ||
go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c | ||
.PHONY: cover | ||
|
||
.PHONY: publish_cover | ||
publish_cover: cover | ||
go get -d golang.org/x/tools/cmd/cover | ||
go get github.com/modocache/gover | ||
go get github.com/mattn/goveralls | ||
gover | ||
@goveralls -coverprofile=gover.coverprofile -service=travis-ci -repotoken=$(COVERALLS_TOKEN) | ||
.PHONY: publish_cover | ||
|
||
.PHONY: services | ||
services: | ||
docker-compose pull mongo redis gpubsub | ||
docker-compose up -d mongo redis gpubsub | ||
.PHONY: services | ||
|
||
.PHONY: stop | ||
stop: | ||
docker-compose down | ||
.PHONY: stop | ||
|
||
.PHONY: clean | ||
clean: | ||
@find . -name \.coverprofile -type f -delete | ||
@rm -f gover.coverprofile | ||
.PHONY: clean | ||
|
||
.PHONY: mongo_shell | ||
mongo_shell: | ||
docker run -it --network eventhorizon_default --rm mongo:4.2 mongo --host mongo test |