generated from nano-interactive/go-library-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yml
34 lines (32 loc) · 987 Bytes
/
Taskfile.yml
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
version: '3'
tasks:
lint:
cmds:
- golangci-lint run --color "always" -v -j 8
sec:
cmds:
- @gosec ./...
test:
cmds:
- go test -covermode=atomic -race -coverprofile=coverage.txt -timeout 5m -json -v ./... | gotestfmt -showteststatus
env:
GOMAXPROCS: 4
cli-tools:
cmds:
- go install github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt@latest
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- go install github.com/securego/gosec/v2/cmd/gosec@latest
- go install mvdan.cc/gofumpt@latest
update:
cmds:
- go get -u ./... # Updates regular packages
- go get -u -t ./... # Updates Test packages
tidy:
cmds:
- rm -f go.sum
- go mod tidy
# ifeq ($(RACE), 1)
# @CC=gcc CXX=g++ go test ./... -race -covermode=atomic -coverprofile=coverage.txt -timeout 5m
# else
# @CC=gcc CXX=g++ go test ./... -covermode=atomic -coverprofile=coverage.txt -timeout 1m
# endif