Repository navigation
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
90 lines (74 loc) · 1.61 KB
/
Copy pathTaskfile.yaml
File metadata and controls
90 lines (74 loc) · 1.61 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
86
87
88
89
90
version: "3"
vars:
BIN: bin/gitcd
tasks:
setup:
desc: Install the pinned toolchain
cmds:
- mise trust
- mise install
build:
desc: Build the CLI into bin/
cmds:
- go build -o {{.BIN}} ./cmd/gitcd
build:release:
desc: Build a local snapshot release with goreleaser
cmds:
- goreleaser release --snapshot --clean
run:
desc: Run the CLI from source, arguments after --
cmds:
- go run ./cmd/gitcd {{.CLI_ARGS}}
lint:fmt:
desc: Go format check through golangci-lint
cmds:
- golangci-lint fmt --diff
lint:vet:
desc: Go vet
cmds:
- go vet ./...
lint:golangci:
desc: Go lint
cmds:
- golangci-lint run
lint:markdown:
desc: Markdown lint
cmds:
- markdownlint-cli2 "**/*.md"
lint:yaml:
desc: YAML lint
cmds:
- yamllint .
lint:actions:
desc: GitHub Actions workflow lint
cmds:
- actionlint
lint:goreleaser:
desc: goreleaser configuration lint
cmds:
- goreleaser check
lint:secrets:
desc: Secret scan over the git history
cmds:
- gitleaks git --no-banner --redact
test:go:
desc: Go tests with the race detector
cmds:
- go test -race -count=1 ./...
check:
desc: Every check, one after another
cmds:
- task: lint:fmt
- task: lint:vet
- task: lint:golangci
- task: lint:markdown
- task: lint:yaml
- task: lint:actions
- task: lint:goreleaser
- task: lint:secrets
- task: test:go
- task: build
fmt:
desc: Format Go code
cmds:
- golangci-lint fmt