-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
95 lines (82 loc) · 2.35 KB
/
mise.toml
File metadata and controls
95 lines (82 loc) · 2.35 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
[env]
_.path = ["target/debug", "test/bats/bin"]
[tools]
aube = "latest"
age = "latest"
"cargo:cargo-msrv" = "latest"
cargo-binstall = "latest"
communique = "latest"
"cargo:cargo-edit" = "latest"
git-cliff = "latest"
hk = "latest"
pkl = "latest"
prettier = "latest"
shellcheck = "latest"
shfmt = "latest"
actionlint = "latest"
1password = "latest"
bitwarden = "latest"
bitwarden-secrets-manager = "latest"
vault = "latest"
infisical = "latest"
node = "24"
usage = "latest"
[tasks.test]
description = "Run both cargo and bats tests"
depends = ["test:cargo", "test:bats"]
[tasks."test:cargo"]
description = "Run cargo tests only"
run = "cargo test"
[tasks."test:bats"]
description = "Run bats tests only"
run = '''
filter_tags=""
if [ -n "$BATS_FILTER_TAGS" ]; then
filter_tags="--filter-tags $BATS_FILTER_TAGS"
fi
if [ -n "$TRANCHE" ] && [ -n "$TRANCHE_COUNT" ]; then
tests=$(ls -1 test/*.bats | sort | awk -v t=$TRANCHE -v n=$TRANCHE_COUNT 'NR % n == t')
fnox exec -- bats --jobs 16 $filter_tags $tests
else
fnox exec -- bats --jobs 16 $filter_tags {{arg(name='test', var=true, default='test')}}
fi
'''
[tasks."test:bats:fork"]
description = "Run bats tests simulating forked PR (no age key access)"
env = { FNOX_AGE_KEY = "/tmp/nonexistent-age-key.txt" }
run = "fnox exec -- bats --jobs 16 {{arg(name='test', var=true, default='test')}}"
[tasks.cargo-test]
description = "Run cargo tests only"
run = "cargo test"
[tasks.lint]
run = "hk check --all --slow"
[tasks.lint-fix]
run = "hk fix --all --slow"
[tasks.build]
description = "Build the project"
run = "cargo build"
[tasks.ci]
description = "Run full CI check (build, test, lint)"
depends = ["build", "test", "lint"]
[tasks.render]
description = "Render documentation from usage"
depends = ["render:*"]
[tasks."render:schema"]
description = "Generate JSON Schema for fnox configuration"
depends = ["build"]
run = [
"fnox schema > docs/public/schema.json",
"prettier --write docs/public/schema.json",
"git add docs/public/schema.json",
]
[tasks."render:usage"]
description = "Generate CLI documentation from usage"
depends = ["build"]
run = [
"fnox usage > fnox.usage.kdl",
"rm -rf docs/cli && mkdir -p docs/cli",
"usage g markdown -mf fnox.usage.kdl --out-dir docs/cli --url-prefix /cli",
"usage g json -f fnox.usage.kdl > docs/cli/commands.json",
"prettier --write docs/cli",
"git add fnox.usage.kdl docs/cli",
]