-
Notifications
You must be signed in to change notification settings - Fork 3
/
Taskfile.yaml
53 lines (43 loc) · 950 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
51
52
53
# https://taskfile.dev
---
version: "3"
silent: true
vars:
BIN_NAME: "myks"
tasks:
default: ${GOTASK_BIN:-task} --list
go:fmt:
desc: Format the code
cmds:
- goimports-reviser -rm-unused -set-alias -format ./...
- gofumpt -w .
go:lint:golangci:
cmds:
- golangci-lint run
go:lint:vet:
cmds:
- go vet ./...
go:lint:sec:
cmds:
# G304: Potential file inclusion via variable is a false positive
- gosec -exclude=G304 ./...
go:lint:
desc: Lint the code
deps:
- go:lint:golangci
- go:lint:vet
- go:lint:sec
go:build:
desc: Build the binary
cmds:
- mkdir -p bin
- goreleaser build --snapshot --clean --single-target --output
bin/{{.BIN_NAME}}
go:test:
desc: Test the code
deps:
- go:build
cmds:
- |
export PATH="{{.ROOT_DIR}}/bin:$PATH"
go test -failfast -race ./... {{.CLI_ARGS}}