-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 890 Bytes
/
Makefile
File metadata and controls
52 lines (42 loc) · 890 Bytes
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
build:
@echo "+ $@"
go build -o bin/server ./cmd/server
.PHONY: build
run:
@echo "+ $@"
SQLITE_DB_PATH=./mediary.db go run ./cmd/server
.PHONY: run
test:
@echo "+ $@"
go test -v -failfast -race ./... -coverprofile=coverage.out
.PHONY: test
tidy:
@echo "+ $@"
go mod tidy
.PHONY: tidy
precommit: tidy build lint test
.PHONY: precommit
lint:
@echo "+ $@"
golangci-lint run -v --timeout 5m
.PHONY: lint
test-e2e-gen-docs:
@echo "+ $@"
go test -v -timeout 30m -failfast -race -tags gen_docs ./... -coverprofile=coverage.out
.PHONY: test-e2e-gen-docs
generate: prebuild
@echo "+ $@"
go generate ./...
.PHONY: generate
cover:
@echo "+ $@"
go tool cover -html=coverage.out
.PHONY: cover
docker-build:
@echo "+ $@"
docker build -t ghcr.io/dir01/mediary:alpha .
.PHONY: docker-build
docker-push:
@echo "+ $@"
docker push ghcr.io/dir01/mediary:alpha
.PHONY: docker-push