Debian Codegraph @

Makefile

raw
1 SOURCE_FILES?=./...
2 TEST_PATTERN?=.
3
4 export GO111MODULE := on
5
6 setup:
7 go mod tidy
8 .PHONY: setup
9
10 build:
11 go build
12 .PHONY: build
13
14 test:
15 go test -v -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt $(SOURCE_FILES) -run $(TEST_PATTERN) -timeout=2m
16 .PHONY: test
17
18 cover: test
19 go tool cover -html=coverage.txt
20 .PHONY: cover
21
22 fmt:
23 gofumpt -w -l .
24 .PHONY: fmt
25
26 lint:
27 golangci-lint run ./...
28 .PHONY: lint
29
30 ci: build test
31 .PHONY: ci
32
33 card:
34 wget -O card.png -c "https://og.caarlos0.dev/**env**: parse envs to structs.png?theme=light&md=1&fontSize=100px&images=https://github.com/caarlos0.png"
35 .PHONY: card
36
37 .DEFAULT_GOAL := ci