-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
50 lines (41 loc) · 975 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# https://taskfile.dev/#/installation
version: '3'
silent: true
tasks:
default:
cmds:
- task: tools:install
- task: tidy
- task: fmt
- task: lint
- task: test
- task: install
tools:install:
- echo "Install local tools..."
- (which gci > /dev/null) || go install github.com/daixiang0/gci@latest
- (which gofumpt > /dev/null) || go install mvdan.cc/gofumpt@latest
tidy:
cmds:
- echo "Tidy..."
- go mod tidy
fmt:
cmds:
- echo "Fmt..."
- gofumpt -w .
- gci write -s standard -s default -s "Prefix(github.com/Antonboom/errname)" . 2> /dev/null
lint:
cmds:
- echo "Lint..."
- golangci-lint run --fix ./...
test:
cmds:
- echo "Tests..."
- go test ./...
test:coverage:
cmds:
- echo "Tests with coverage..."
- go test -coverprofile=coverage.out ./...
install:
cmds:
- echo "Install..."
- go install ./...