-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
71 lines (59 loc) · 1.2 KB
/
Taskfile.yml
File metadata and controls
71 lines (59 loc) · 1.2 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
version: '3'
vars:
BINARY_NAME: smallflow
MAIN_PATH: ./cmd/smallflow
tasks:
default:
desc: Show available tasks
cmds:
- task --list
build:
desc: Build the binary
cmds:
- go build -o bin/{{.BINARY_NAME}} {{.MAIN_PATH}}
sources:
- "**/*.go"
generates:
- bin/{{.BINARY_NAME}}
run:
desc: Run the application
cmds:
- task: build
- ./bin/{{.BINARY_NAME}}
test:
desc: Run tests
cmds:
- go test -v -race -coverprofile=coverage.out ./...
test-coverage:
desc: Run tests with coverage report
cmds:
- go test -v -race -coverprofile=coverage.out ./...
- go tool cover -html=coverage.out -o coverage.html
lint:
desc: Run linter
cmds:
- golangci-lint run ./...
fmt:
desc: Format code
cmds:
- go fmt ./...
vet:
desc: Run go vet
cmds:
- go vet ./...
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
clean:
desc: Clean build artifacts
cmds:
- rm -rf bin/
- rm -f coverage.out coverage.html
check:
desc: Run all checks (fmt, vet, lint, test)
cmds:
- task: fmt
- task: vet
- task: lint
- task: test