-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmise.toml
More file actions
162 lines (136 loc) · 4.07 KB
/
Copy pathmise.toml
File metadata and controls
162 lines (136 loc) · 4.07 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
[tools]
# nnctl/go.mod declares the Go language version as 1.26; pin the patch
# release used in this workspace so mise installs a concrete toolchain.
go = "1.26.5"
zig = "0.16.0"
golangci-lint = "2.12.2"
"cargo:zizmor" = "1.26.1"
packer = "1.15.4"
"go:golang.org/x/vuln/cmd/govulncheck" = "1.1.4"
node = "25.9.0"
# Commit hook tooling is pinned by package-lock.json:
# @commitlint/cli 21.1.0, @commitlint/config-conventional 21.1.0,
# and @j178/prek 0.4.5.
[tasks."zig:test"]
description = "Run Zig unit tests"
run = "zig build test"
[tasks."zig:test-acceptance"]
description = "Run Zig acceptance tests"
run = "zig build test-acceptance"
[tasks."zig:fmt-check"]
description = "Check Zig formatting"
run = "zig fmt --check build.zig build.zig.zon benchmarks experiments src"
[tasks."go:test"]
description = "Run nnctl Go tests"
dir = "nnctl"
run = "go test ./..."
[tasks."go:test-race"]
description = "Run nnctl Go tests with the race detector"
dir = "nnctl"
run = "go test -race ./..."
[tasks."go:coverage"]
description = "Measure nnctl Go coverage"
dir = "nnctl"
run = """
mkdir -p ../coverage
go test -covermode=atomic -coverprofile=../coverage/go.out ./...
go tool cover -func=../coverage/go.out | tee ../coverage/go.txt
awk '$1 == "total:" { value = $3; sub(/%$/, "", value); found = 1; if (value + 0 < 59.0) exit 1 } END { if (!found) exit 2 }' ../coverage/go.txt
"""
[tasks."go:lint"]
description = "Run golangci-lint for nnctl"
dir = "nnctl"
run = "golangci-lint run --config ../.golangci.yml ./..."
[tasks."go:vuln"]
description = "Scan reachable nnctl dependencies for known vulnerabilities"
dir = "nnctl"
run = "govulncheck ./..."
[tasks."packer:fmt-check"]
description = "Check the embedded Verda Packer template formatting"
run = "packer fmt -check nnctl/internal/cloud/verda/packer/ubuntu.pkr.hcl"
[tasks."packer:validate"]
description = "Initialize the pinned Verda plugin and validate the template"
depends = ["packer:fmt-check"]
dir = "nnctl/internal/cloud/verda/packer"
run = """
packer init .
packer validate -syntax-only ubuntu.pkr.hcl
"""
[tasks."actions:lint"]
description = "Scan GitHub Actions workflows with zizmor"
run = "zizmor .github/workflows"
[tasks."npm:install"]
description = "Install Node hook dependencies"
run = "npm ci"
[tasks."web:install"]
description = "Install Svelte learning lab dependencies"
dir = "web"
run = "npm ci"
[tasks."web:check"]
description = "Type-check the Svelte learning lab"
depends = ["web:install"]
dir = "web"
run = "npm run check"
[tasks."web:lint"]
description = "Lint the Svelte learning lab with Oxlint"
depends = ["web:install"]
dir = "web"
run = "npm run lint"
[tasks."web:test"]
description = "Run Svelte learning lab tests"
depends = ["web:install"]
dir = "web"
run = "npm test"
[tasks."web:coverage"]
description = "Measure Svelte learning lab coverage"
depends = ["web:install"]
dir = "web"
run = "npm run test:coverage"
[tasks.coverage]
description = "Measure Go and web coverage"
depends = ["go:coverage", "web:coverage"]
[tasks."web:build"]
description = "Build the Svelte learning lab"
depends = ["web:install"]
dir = "web"
run = "npm run build"
[tasks.lab]
description = "Build and run the real-time learning lab"
depends = ["web:build"]
dir = "nnctl"
run = "go run ./cmd/nnctl lab"
[tasks."lab:api"]
description = "Run only the learning lab API for Vite development"
dir = "nnctl"
run = "go run ./cmd/nnctl lab --api-only"
[tasks."hooks:install"]
description = "Install git hooks through prek"
depends = ["npm:install", "web:install"]
run = "npm run hooks:install"
[tasks."hooks:check"]
description = "Run prek hooks on all files"
depends = ["npm:install", "web:install"]
run = "npm run prek:all"
[tasks."commitlint:head"]
description = "Lint the latest commit message"
depends = ["npm:install"]
run = "npx --no-install commitlint --last --verbose"
[tasks.ci]
description = "Run local CI checks"
depends = [
"zig:fmt-check",
"zig:test",
"zig:test-acceptance",
"go:test-race",
"go:coverage",
"go:lint",
"go:vuln",
"packer:validate",
"actions:lint",
"hooks:check",
"web:check",
"web:lint",
"web:test",
"web:coverage",
"web:build",
]