-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (33 loc) · 924 Bytes
/
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
.PHONY: build
tidy:
go mod tidy
generate:
buf generate
fmt:
go fmt ./...
vet:
go vet -v ./...
lint:
buf lint
golangci-lint -v run
build/app:
go build -a -ldflags '-extldflags "-static"' -o app ./cmd/app
build/gw:
go build -a -ldflags '-extldflags "-static"' -o gateway ./cmd/gateway
build: build/app build/gw
test:
go test -race -covermode=atomic -coverprofile=coverage.tx -v ./...
go tool cover -func=coverage.tx -o=coverage.out
test-html:
go test -race -covermode=atomic -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o=coverage.html
ci/compose-up:
docker compose -f ./deployments/local/ci.docker-compose.yml up -d --build
ci/compose-down:
docker compose -f ./deployments/local/ci.docker-compose.yml down --rmi all
test-e2e:
npx playwright test
ci/test-e2e:
CI=true npx playwright test
ci: ci/compose-up ci/test-e2e ci/compose-down
all: generate tidy fmt vet lint test