-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathMakefile
39 lines (30 loc) · 1.07 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
install:
go get -u ./... && go mod tidy
test-auth:
mkdir -p tmp
go test ./auth/... -v -race -count=1 -coverprofile=./tmp/auth_coverage.out
test-utils:
mkdir -p tmp
SPAUTH_ENVCODE=spo go test ./csom -v -race -count=1 -coverprofile=./tmp/csom_coverage.out
SPAUTH_ENVCODE=spo go test ./cpass -v -race -count=1 -coverprofile=./tmp/cpass_coverage.out
SPAUTH_ENVCODE=spo go test ./auth -v -race -count=1 -coverprofile=./tmp/dynauth_coverage.out
test-api:
mkdir -p tmp
SPAUTH_ENVCODE=spo SPAPI_HEAVY_TESTS=true go test ./api/... -v -race -count=1 -coverprofile=./tmp/api_coverage.out
test-api-p:
mkdir -p tmp
SPAUTH_ENVCODE=spo SPAPI_HEAVY_TESTS=true GOMAXPROCS=10 go test ./api/... -v -race -count=1 -coverprofile=./tmp/api_coverage.out
format:
gofmt -s -w .
lint:
golangci-lint run
generate:
go install ./cmd/ggen/...
go generate ./api/...
make format
coverage:
SPAUTH_ENVCODE=spo SPAPI_HEAVY_TESTS=true go test ./... -count=1 -coverprofile=coverage.out
go tool cover -func=coverage.out
go tool cover -html=coverage.out
auth-precover:
bash ./test/scripts/cover-auth.sh