-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
67 lines (55 loc) · 1.14 KB
/
Taskfile.yaml
File metadata and controls
67 lines (55 loc) · 1.14 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
version: "3"
vars:
BINARY: captain
BIN_DIR: .bin
INSTALL_DIR: /usr/local/bin
tasks:
default:
cmds:
- task --list
build:
desc: Build the captain binary
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/{{.BINARY}} ./cmd/captain
lint:
desc: Run linters
cmds:
- golangci-lint run ./...
test:
desc: Run tests
cmds:
- go test ./...
test:verbose:
desc: Run tests with verbose output
cmds:
- go test -v ./...
test:fixtures:
desc: Run gavel fixture tests
deps: [build]
cmds:
- PATH="$PWD/.bin:$PATH" gavel fixtures pkg/cli/testdata/history_test.md
install:
desc: Build and install captain to /usr/local/bin
deps: [build]
cmds:
- cp {{.BIN_DIR}}/{{.BINARY}} {{.INSTALL_DIR}}/{{.BINARY}}
fmt:
desc: Format Go code
cmds:
- gofmt -w .
tidy:
desc: Tidy go modules
cmds:
- go mod tidy
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BIN_DIR}}
all:
desc: Run fmt, lint, test, and build
cmds:
- task: fmt
- task: lint
- task: test
- task: build