-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmise.toml
More file actions
112 lines (93 loc) · 3.21 KB
/
mise.toml
File metadata and controls
112 lines (93 loc) · 3.21 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[tools]
# Go Tools
"go" = "1.26"
"go:golang.org/x/tools/cmd/deadcode" = "latest"
"go:github.com/abice/go-enum" = "v0.9.2"
"github:hay-kot/gobusgen" = "v0.3.0"
"github:sqlc-dev/sqlc" = "v1.30.0"
golangci-lint = "2.11.4"
"goreleaser" = "latest"
# Docs Site Tools
uv = "latest"
"pipx:zensical" = "latest"
[env]
HIVE_LOG_LEVEL = "debug"
HIVE_LOG_FILE = "./dev.log"
[tasks."generate:enums"]
description = "Generate enum methods using go-enum"
sources = ["internal/core/action/type.go", "internal/core/hc/item.go"]
outputs = ["internal/core/action/type_enum.go", "internal/core/hc/item_enum.go"]
run = "go-enum --nocase --names --marshal -f internal/core/action/type.go -f internal/core/hc/item.go"
[tasks.generate]
description = "Run all code generators"
depends = ["generate:enums"]
sources = [
"internal/core/eventbus/events.go",
"internal/data/db/queries/queries.sql",
"internal/data/db/queries/queries_hc.sql",
"internal/data/db/migrations/*.up.sql",
"sqlc.yaml",
]
outputs = [
"internal/core/eventbus/eventbus.gen.go",
"internal/data/db/db.go",
"internal/data/db/models.go",
"internal/data/db/queries.sql.go",
"internal/data/db/queries_hc.sql.go",
]
run = ["go generate ./...", "sqlc generate"]
[tasks.start]
alias = "default"
description = "Run hive with global config (supports CLI args)"
depends = ["generate"]
run = "go run *.go"
[tasks.dev]
description = "Run hive with dev config (supports CLI args)"
depends = ["generate"]
env = { HIVE_LOG_LEVEL = "debug", HIVE_LOG_FILE = "./dev.log", HIVE_CONFIG = "./dev/config.dev.yaml", HIVE_DATA_DIR = "./.data" }
run = "go run *.go"
[tasks.build]
description = "Build with goreleaser"
depends = ["generate"]
run = "goreleaser build --snapshot --clean"
[tasks.test]
description = "Run all go tests"
run = "go test ./..."
[tasks.coverage]
description = "Run tests with race detection and coverage"
quiet = true
run = "go test -race -coverprofile=coverage.out -covermode=atomic ./... -v -cover"
[tasks.lint]
description = "Run golangci-lint"
run = "golangci-lint run ./..."
[tasks.fmt]
description = "Run golangci-lint fmt"
run = "golangci-lint fmt ./..."
[tasks.deadcode]
description = "Check for unreachable code"
run = "deadcode -test ./..."
[tasks.check]
description = "Run tidy, lint, test, and deadcode"
run = ["go mod tidy", { tasks = ["lint", "test", "deadcode"] }]
[tasks.validate]
description = "Run doctor with dev config"
env = { HIVE_CONFIG = "./dev/config.dev.yaml" }
run = "go run *.go doctor"
[tasks."validate:invalid"]
description = "Run doctor with intentionally invalid config"
env = { HIVE_CONFIG = "./dev/config.invalid.yaml" }
run = "go run *.go doctor || true"
[tasks."docs:serve"]
description = "Serve documentation site locally"
run = "zensical serve"
[tasks."docs:build"]
description = "Build documentation site with llms.txt"
run = ["zensical build", "./scripts/generate-llmstxt.sh"]
[tasks.integration]
description = "Run Docker-based integration tests"
depends = ["build"]
run = "docker build -f Dockerfile.test -t hive-integration-test . && docker run --rm hive-integration-test"
[tasks."container"]
description = "Build Docker image and run ephemeral container"
depends = ["build"]
run = "docker run --rm -it -e CLAUDE_CREDENTIALS=\"$CLAUDE_CREDENTIALS\" $(docker build -q .)"