forked from sectrean/go-seq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
85 lines (67 loc) · 1.71 KB
/
Copy pathTaskfile.yml
File metadata and controls
85 lines (67 loc) · 1.71 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# yaml-language-server: $schema=https://json.schemastore.org/taskfile.json
version: '3'
env:
SOURCE_FOLDER: ./...
BUILD_FOLDER: build
COVERAGE_OUT_FILE: coverage.out
COVERAGE_HTML_FILE: coverage.html
tasks:
markdown:
cmds:
- markdownlint-cli2 "**/*.md" "#vendor"
audit:
cmds:
- go mod verify
- go vet ./...
- go tool govulncheck ./...
lint:
cmds:
- go tool golangci-lint run --fix
- go tool gofumpt -w -l .
- go tool betteralign -test_files -generated_files -apply ./...
lint:report:
cmds:
- go tool golangci-lint run --issues-exit-code 0 --print-issued-lines=false --out-format code-climate:gl-code-quality-report.json,line-number
race:
cmds:
- CGO_ENABLED=0 go test -race -count 5 ./...
test:
cmds:
- go test -v ./...
test:report:
cmds:
- go tool gotestsum --junitfile report.xml --format testname
mock:
cmds:
- go tool mockery --config .mockery.yaml
coverage:
cmds:
- go test $SOURCE_FOLDER -covermode=count -coverprofile=$COVERAGE_OUT_FILE
- go tool cover -html $COVERAGE_OUT_FILE -o $COVERAGE_HTML_FILE
- go tool cover -func=$COVERAGE_OUT_FILE -o=$COVERAGE_OUT_FILE
coverage:report:
cmds:
- CGO_ENABLED=0 go test $SOURCE_FOLDER -coverprofile=coverage-report.out
clean:
cmds:
- rm -rf $COVERAGE_OUT_FILE $COVERAGE_HTML_FILE
download:
cmds:
- go mod tidy
upgrade:
cmds:
- go tool go-mod-upgrade
build:
cmds:
- go build -v ./...
release:
cmds:
- task: download
- task: mock
- task: build
- task: lint
- task: test
- task: race
default:
cmds:
- task: release