-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (34 loc) · 1.14 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
default: test_docker
test:
go test ./...
.PHONY: test
test_docker:
docker-compose -f ./deployments/docker-compose.yaml run --rm app make test
docker-compose -f ./deployments/docker-compose.yaml down
.PHONY: test_docker
cover:
go list -f '{{if len .TestGoFiles}}"go test -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c
.PHONY: cover
cover_docker:
docker-compose -f ./deployments/docker-compose.yaml run --rm app make cover
docker-compose -f ./deployments/docker-compose.yaml down
.PHONY: cover_docker
publish_cover: cover_docker
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
services:
docker-compose -f ./deployments/docker-compose.yaml build firestore_emulator
docker-compose -f ./deployments/docker-compose.yaml up -d firestore_emulator
.PHONY: services
stop:
docker-compose -f ./deployments/docker-compose.yaml down
.PHONY: stop
clean:
@find . -name \.coverprofile -type f -delete
@rm -f gover.coverprofile
.PHONY: clean