-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTaskfile.yaml
50 lines (41 loc) · 993 Bytes
/
Taskfile.yaml
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
version: "3"
env:
GO111MODULE: "on"
GOPROXY: "https://proxy.golang.org,direct"
tasks:
setup:
desc: Setup dev environment
cmds:
- go mod tidy
fmt:
desc: Format the code
cmds:
- golines --shorten-comments -m 120 -w .
- gofumpt -w -l .
- gci write -s standard -s default -s "prefix(github.com/nikoksr/konfetty)" .
lint:
desc: Lint the code with golangci-lint
cmds:
- golangci-lint run ./...
test:
desc: Run tests
cmds:
- go build ./...
- go test -failfast -race ./...
gen-coverage:
desc: Generate coverage report
cmds:
- go test -race -covermode=atomic -coverprofile=coverage.out ./... > /dev/null
coverage-html:
desc: Generate coverage report and open it in the browser
cmds:
- task gen-coverage
- go tool cover -html=coverage.out -o cover.html
help:
desc: Show help
cmds:
- task --list
default:
desc: Show help
cmds:
- task help