-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (52 loc) · 2.05 KB
/
Makefile
File metadata and controls
70 lines (52 loc) · 2.05 KB
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
.PHONY: all clean build test prod-test test-unit test-integration test-auth-service test-cache-service \
test-leaderboard-service test-topics-service test-http-service format lint precommit help
all: precommit
## Clean the project
clean:
./gradlew clean
## Build the project
build:
./gradlew build
## Run all the tests
test: test-unit test-integration
## Run the unit tests
test-unit:
./gradlew test
## Run all integration tests
test-integration:
./gradlew integrationTest
## Run all integration tests with consistent reads enabled
prod-test:
@CONSISTENT_READS=1 $(MAKE) test-integration
## Run the auth service tests
test-auth-service:
@CONSISTENT_READS=1 ./gradlew test-auth-service
## Run the cache service tests
test-cache-service:
@CONSISTENT_READS=1 ./gradlew test-cache-service
## Run the leaderboard service tests
test-leaderboard-service:
@CONSISTENT_READS=1 ./gradlew test-leaderboard-service
## Run the topics service tests
test-topics-service:
@CONSISTENT_READS=1 ./gradlew test-topics-service
## Run the topics subscription initialization tests
test-topics-subscription-initialization:
@CONSISTENT_READS=1 ./gradlew test-topics-subscription-initialization
## Run the http service tests
test-http-service:
@echo "No tests for http service."
## Run the retry service tests
test-retries:
./gradlew test-retries
## Format the code
format:
./gradlew spotlessApply
## Lint the code
lint:
./gradlew spotlessCheck
## Run the precommit checks
precommit: format lint build test
# See <https://gist.github.com/klmr/575726c7e05d8780505a> for explanation.
help:
@echo "$$(tput bold)Available rules:$$(tput sgr0)";echo;sed -ne"/^## /{h;s/.*//;:d" -e"H;n;s/^## //;td" -e"s/:.*//;G;s/\\n## /---/;s/\\n/ /g;p;}" ${MAKEFILE_LIST}|LC_ALL='C' sort -f|awk -F --- -v n=$$(tput cols) -v i=19 -v a="$$(tput setaf 6)" -v z="$$(tput sgr0)" '{printf"%s%*s%s ",a,-i,$$1,z;m=split($$2,w," ");l=n-i;for(j=1;j<=m;j++){l-=length(w[j])+1;if(l<= 0){l=n-i-length(w[j])-1;printf"\n%*s ",-i," ";}printf"%s ",w[j];}printf"\n";}'|more $(shell test $(shell uname) == Darwin && echo '-Xr')