Repository navigation
Expand file tree
/
Copy pathmise.toml
More file actions
164 lines (142 loc) · 3.61 KB
/
Copy pathmise.toml
File metadata and controls
164 lines (142 loc) · 3.61 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[env]
_.path = ["test/bats/bin", "{{ env.CARGO_TARGET_DIR | default(value='target') }}/debug", "node_modules/.bin"]
[tools]
actionlint = "latest"
cargo-binstall = "latest"
"cargo:cargo-msrv" = "latest"
git-cliff = "latest"
hadolint = "latest"
ktlint = "latest"
node = "latest"
"npm:prettier" = "latest"
"npm:stylelint" = "latest"
pkl = "latest"
ruff = "latest"
shellcheck = "latest"
swiftlint = "latest"
yq = "latest"
"cargo:cargo-release" = "latest"
bun = "latest"
ripgrep = "latest"
"cargo:cargo-edit" = "latest"
usage = "latest"
vhs = "latest"
taplo = "latest"
uv = "latest"
[tasks.init]
run = '''
git submodule update --init --recursive
'''
[tasks.build]
depends = ["init"]
alias = "b"
run = "cargo build"
sources = ["build.rs", "src/**/*", "pkl/**/*", "ensembler/src/**/*", "xx/src/**/*", "clx/**/*"]
outputs = ["target/debug/hk"]
[tasks.hk]
alias = "dev"
depends = ["build"]
run = "hk"
[tasks.msrv]
run = "cargo msrv verify"
[tasks.benchmark]
run = "./benchmark/benchmark.sh"
tools = { lefthook = "latest", "pre-commit" = "latest" }
[tasks.ci]
depends = ["test", "lint", "docs:sync"]
[tasks.test]
alias = ["t"]
depends = ["test:cargo", "test:bats"]
[tasks."test:cargo"]
alias = "tc"
run = "cargo test --all --all-features"
[tasks."test:bats"]
alias = "tb"
depends = ["build"]
run = '''
tests={{arg(name='test', var=true, default='test')}}
mise run test:bats:libgit2 $tests ::: test:bats:nolibgit2 $tests
'''
[tasks."test:bats:libgit2"]
depends = ["build"]
run = "HK_LIBGIT2=1 bats --jobs 16 {{arg(name='test', var=true, de
876C
fault='test')}}"
[tasks."test:bats:nolibgit2"]
depends = ["build"]
run = "HK_LIBGIT2=0 bats --jobs 16 {{arg(name='test', var=true, default='test')}}"
[tasks.dist]
run = "pkl project package pkl --output-path docs/public/pkl"
[tasks.prelint]
run = "echo prelint"
[tasks.postlint]
run = "echo postlint"
[tasks.pre-release]
depends = ["render"]
run = [
"git cliff -o CHANGELOG.md --tag {{option(name='version')}}",
"VERSION={{option(name='version')}} mise run update-version",
]
[tasks.release]
run = "cargo release"
[tasks.lint]
depends = ["build"]
run = ["hk check --all", "hk check --all --slow"]
[tasks.lint-fix]
alias = ["fix", "format"]
depends = ["build"]
run = ["hk fix --all", "hk fix --all --slow"]
[tasks.docs]
dir = "docs"
run = "bun i && bun run docs:dev"
[tasks."docs:build"]
dir = "docs"
run = "bun i && bun run docs:build"
[tasks."docs:sync"]
run = "./scripts/check-docs-sync.sh"
[tasks."docs-sync"]
run = "./scripts/check-docs-sync.sh"
[tasks.render]
depends = ["render:*"]
[tasks."demo"]
depends = ["build"]
run = "vhs tapes/hk-demo.tape"
[tasks."render:usage"]
depends = ["build"]
run = [
"hk usage > hk.usage.kdl",
"rm -rf docs/cli && mkdir -p docs/cli",
"usage g markdown -mf hk.usage.kdl --out-dir docs/cli --url-prefix /cli",
"usage g json -f hk.usage.kdl > docs/cli/commands.json",
"prettier --write docs/cli",
"git add hk.usage.kdl docs",
]
[tasks."test:migrate:airflow"]
depends = ["build"]
run = '''
if [ ! -d ./airflow ]; then
git clone https://github.com/jdx/airflow ./airflow
fi
cd ./airflow
git checkout hk
hk migrate pre-commit --hk-pkl-root ../pkl --force
if [ -n "$(git status --porcelain hk.pkl)" ]; then
git add hk.pkl
git -c commit.gpgsign=false commit -m "chore: regenerate hk.pkl"
fi
hk check --all
'''
[tasks."test:migrate:pillow"]
depends = ["build"]
run = '''
if [ ! -d ./pillow ]; then
git clone https://github.com/jdx/Pillow ./pillow
fi
cd ./pillow
git checkout main
git pull
hk migrate pre-commit --hk-pkl-root ../pkl --force
if [ -n "$(git status --porcelain hk.pkl)" ]; then
git add hk.pkl
git -c commit.gpgsign=false commit -m "chore: regenerate hk.pkl"
fi
hk check --all
'''