- Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (23 loc) · 716 Bytes
/
Makefile
File metadata and controls
27 lines (23 loc) · 716 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
OUT_DIR = out/
help:
@echo "=====[ Go Cast ]====="
@echo "test ...... Run tests and show the code coverage."
@echo "lint ...... Run linter to check gofmt, govet, etc."
@echo "ci ........ Run common flow: vendor, test, lint, build."
.PHONY: help
# Run tests and show code coverage statistics.
test:
mkdir -p $(OUT_DIR)
go test -coverprofile $(OUT_DIR)coverage.out
go tool cover -func $(OUT_DIR)coverage.out
.PHONY: test
# Check that all is ok.
# see: .golangci.yaml
# (!!!) INSTALL golangci to complete checking:
# go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
lint:
golangci-lint run
.PHONY: lint
# CI automation to check local deps, tests/lint and build.
ci: test lint
.PHONY: ci