-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
69 lines (54 loc) · 1.54 KB
/
Copy pathmise.toml
File metadata and controls
69 lines (54 loc) · 1.54 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
[vars]
project = "bookmark-manager"
[tasks.run]
description = "Run the application"
run = "go run ."
[tasks.demo]
description = "Regenerate the demo recording"
run = "cd demo && vhs demo.tape"
[tasks.test]
description = "Run tests"
run = "go test -tags=coverage ./... -cover"
[tasks.clean]
description = "Clean build and test artifacts"
run = ["rm -rf build/", "rm -f *.out *.html *.sql", "go clean -testcache"]
[tasks.fmt]
description = "Format code"
run = "go fmt ./..."
[tasks.vet]
description = "Vet code"
run = "go vet ./..."
[tasks.build]
depends = ["build-linux", "build-windows"]
description = "Build the project binaries"
[tasks.build-linux]
run = "go build -o build/{{vars.project}} ."
[tasks.build-windows]
env = { GOARCH = "amd64", GOOS = "windows" }
run = "go build -o build/{{vars.project}}.exe ."
[tasks.build-container]
quiet = true
run = "podman build -t {{vars.project}}:latest ."
description = "Build the container image"
alias = "bc"
[tasks.run-container]
run = "podman run --rm -p 8080:8080 lets-go"
description = "Run the container image"
alias = "rc"
[tasks.deps]
description = "Install dependencies"
run = ["go mod download", "go mod tidy"]
[tasks.cov]
description = "Run tests with coverage report"
run = [
"go test ./... -coverprofile=coverage.out",
"go tool cover -html=coverage.out -o coverage.html",
"go tool cover -func=coverage.out",
]
[tasks.dev]
description = "Standard development workflow"
depends = ["deps", "fmt", "vet", "test"]
alias = "d"
[tasks.sloc]
description = "Count lines of code"
run = "tokei -e '*_test.go'"