-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
49 lines (39 loc) · 999 Bytes
/
Taskfile.yml
File metadata and controls
49 lines (39 loc) · 999 Bytes
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
version: "3"
vars:
BINARY_NAME: goseed
BUILD_DIR: ./bin
MAIN_PATH: ./cmd/goseed
tasks:
run:
desc: Run the application
cmd: go run {{.MAIN_PATH}}
build:
desc: Build the binary
cmd: go build -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.MAIN_PATH}}
clean:
desc: Remove build artifacts
cmds:
- rm -rf {{.BUILD_DIR}}
- rm -f coverage.out coverage.html
test:
desc: Run tests with race detector
cmd: go test -race ./...
test:verbose:
desc: Run tests (verbose)
cmd: go test -v -race ./...
test:cover:
desc: Run tests with coverage report
cmds:
- cmd: go test -race -coverprofile=coverage.out ./...
- cmd: go tool cover -html=coverage.out -o coverage.html
- cmd: 'echo "Coverage report: coverage.html"'
silent: true
lint:
desc: Run golangci-lint
cmd: golangci-lint run
fmt:
desc: Format code
cmd: go fmt ./...
check:
desc: Run all checks (lint + test)
deps: [lint, test]