-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathTaskfile.yml
More file actions
81 lines (65 loc) · 1.33 KB
/
Copy pathTaskfile.yml
File metadata and controls
81 lines (65 loc) · 1.33 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
version: '3'
vars:
APP_NAME: godo
MAIN_PKG: ./cmd/godo
BIN_DIR: bin
tasks:
all:
desc: Run lint, tests, and build
cmds:
- task: lint
- task: test
- task: build
build:
desc: Build the Go application
cmds:
- go build -o {{.BIN_DIR}}/{{.APP_NAME}} {{.MAIN_PKG}}
build:dist:
desc: Build for distribution
cmds:
- goreleaser build --snapshot --clean
run:
desc: Run the application
cmds:
- go run {{.MAIN_PKG}}
lint:
desc: Run linter only
cmds:
- golangci-lint run
test:
desc: Run tests (fail fast)
cmds:
- go test -failfast ./...
test:verbose:
desc: Run tests with verbose output (fail fast)
cmds:
- go test -v -failfast ./...
test:list:
desc: List all test functions
cmds:
- go test -list '.*' ./... 2>&1 | grep -E '^Test'
tidy:
desc: Tidy Go modules
cmds:
- go mod tidy
clean:
desc: Clean build artifacts
cmds:
- rm -rf {{.BIN_DIR}}/
- rm -rf dist/
install:
desc: Install the application
cmds:
- go install {{.MAIN_PKG}}
release:
desc: Create a release build
cmds:
- goreleaser release --clean
deps:
desc: Show Go dependencies
cmds:
- go mod graph
version:
desc: Show Go version
cmds:
- go version