forked from looplab/eventhorizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (57 loc) · 1.77 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
default: test
.PHONY: test
test:
go test -v -race -short ./...
.PHONY: test_cover
test_cover:
go list -f '{{if len .TestGoFiles}}"cd {{.Dir}} && go test -v -race -short -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c
go run ./hack/coverage/coverage.go . unit.coverprofile
@find . -name \.coverprofile -type f -delete
.PHONY: test_integration
test_integration:
go test -v -race -run Integration ./...
.PHONY: test_integration_cover
test_integration_cover:
go list -f '{{if len .TestGoFiles}}"cd {{.Dir}} && go test -v -race -run Integration -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"{{end}}' ./... | xargs -L 1 sh -c
go run ./hack/coverage/coverage.go . integration.coverprofile
@find . -name \.coverprofile -type f -delete
.PHONY: test_loadtest
test_loadtest:
go test -race -v -run Loadtest ./...
.PHONY: test_all_docker
test_all_docker:
docker-compose up --build --force-recreate eventhorizon-test
.PHONY: merge_coverage
merge_coverage:
go run ./hack/coverage/coverage.go .
.PHONY: upload_coverage
upload_coverage:
go run github.com/mattn/goveralls -coverprofile=coverage.out -repotoken="$$COVERALLS_TOKEN"
.PHONY: run
run:
docker-compose up -d mongodb gpubsub kafka redis nats
.PHONY: run_mongodb
run_mongodb:
docker-compose up -d mongodb
.PHONY: run_gpubsub
run_gpubsub:
docker-compose up -d gpubsub
.PHONY: run_kafka
run_kafka:
docker-compose up -d kafka
.PHONY: run_redis
run_redis:
docker-compose up -d redis
.PHONY: run_nats
run_nats:
docker-compose up -d nats
.PHONY: stop
stop:
docker-compose down
.PHONY: clean
clean:
@find . -name \.coverprofile -type f -delete
@rm -f coverage.out
.PHONY: mongodb_shell
mongodb_shell:
docker run -it --network eventhorizon_default --rm mongo:4.4 mongo --host mongodb-rs test