-
Notifications
You must be signed in to change notification settings - Fork 0
/
.mise.toml
72 lines (62 loc) · 1.58 KB
/
.mise.toml
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
[env]
MISE_ENV_FILE = ".env"
[tools]
dprint = "0.47.2"
watchexec = "2.1.2"
go = "1.23.1"
mkcert = "1.4.4"
"go:honnef.co/go/tools/cmd/staticcheck" = "0.6.0-0.dev"
"go:github.com/flexstack/envtpl" = "v0.1.1"
[tasks."setup"]
description = "Setup the project"
run = [
# Install dependencies
"mise install",
"go mod download",
"go mod tidy",
# Create a local certificate authority
"mkcert -install",
"mkdir -p .ssh",
# If you use a custom development domain, add your domain after
# `localhost` in the command below.
"""
mkcert \
-cert-file=.ssh/cert.pem \
-key-file=.ssh/cert-key.pem \
localhost 127.0.0.1 ::1
""",
# Create a .env file from the .env.template file
# See https://github.com/flexstack/envtpl to do more with `envtpl`
"envtpl .env.template -o .env",
]
sources = ["go.mod", ".mise.toml", "*/**/*.go"]
outputs = ["go.sum"]
[tasks."dev"]
description = "Run the server and watch for changes"
run = "mise watch -t serve -r"
[tasks."serve"]
description = "Run the server"
run = "go run ./cmd/server"
sources = ["go.mod", "*/**/*.go"]
# Waiting for: https://github.com/jdx/mise/issues/2526
# depends = ["setup"]
[tasks."format"]
description = "Format files in the project"
run = "dprint fmt"
[tasks."check:format"]
description = "Check formatting"
run = "dprint check"
[tasks."check:lint"]
description = "Check linting"
run = "staticcheck ./..."
[tasks."test:unit"]
description = "Run unit tests"
run = "go test ./..."
[tasks."default"]
hide = true
depends = ["dev"]
[settings]
activate_aggressive = true
asdf_compat = true
experimental = true
yes = true