Skip to content

Commit 12eaca4

Browse files
Merge pull request #11804 from Kilo-Org/checker-concrete
chore(ci): reduce test log noise
2 parents 98dddd3 + 69e5cac commit 12eaca4

11 files changed

Lines changed: 40 additions & 12 deletions

File tree

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"private": true,
88
"scripts": {
99
"test": "bun test",
10-
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
10+
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --dots --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
1111
"typecheck": "tsgo --noEmit"
1212
},
1313
"bin": {

packages/effect-drizzle-sqlite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"private": true,
88
"scripts": {
99
"test": "bun test --timeout 30000",
10-
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
10+
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --dots --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
1111
"typecheck": "tsgo --noEmit"
1212
},
1313
"exports": {

packages/http-recorder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"private": true,
88
"scripts": {
99
"test": "bun test --timeout 30000",
10-
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
10+
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --dots --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml",
1111
"typecheck": "tsgo --noEmit"
1212
},
1313
"exports": {

packages/kilo-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"scripts": {
3030
"typecheck": "tsgo --noEmit",
3131
"build": "tsc",
32-
"test:ci": "mkdir -p .artifacts/unit && bun test test --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml"
32+
"test:ci": "mkdir -p .artifacts/unit && bun test test --dots --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml"
3333
},
3434
"dependencies": {
3535
"@kilocode/plugin": "workspace:*",

packages/kilo-jetbrains/script/test-ci.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
/**
44
* CI test runner for the JetBrains plugin.
55
*
6-
* Runs ./gradlew clean test --continue --no-build-cache --stacktrace so all modules run even when some fail,
6+
* Runs ./gradlew clean test --continue --no-build-cache --stacktrace --console=plain
7+
* so all modules run even when some fail,
78
* then collects per-module JUnit XML results into .artifacts/unit/junit.xml
89
* so mikepenz/action-junit-report can find them at the standard path.
910
* The generated OpenAPI client can otherwise restore stale compile outputs
@@ -20,7 +21,7 @@ import { mkdirSync, readdirSync, readFileSync, writeFileSync, existsSync } from
2021

2122
const root = join(import.meta.dir, "..")
2223
const gradlew = process.platform === "win32" ? "gradlew.bat" : "./gradlew"
23-
const args = ["clean", "test", "--continue", "--no-build-cache", "--stacktrace"]
24+
const args = ["clean", "test", "--continue", "--no-build-cache", "--stacktrace", "--console=plain"]
2425
const cmd = process.platform === "win32" ? ["cmd.exe", "/c", gradlew, ...args] : [gradlew, ...args]
2526
const fallback = 45 * 60 * 1000
2627
const parsed = Number(process.env.KILO_JETBRAINS_TEST_TIMEOUT_MS ?? fallback)

packages/kilo-sandbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"typecheck": "tsgo --noEmit",
1717
"test": "bun test --timeout 30000",
18-
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml"
18+
"test:ci": "mkdir -p .artifacts/unit && bun test --timeout 30000 --dots --reporter=junit --reporter-outfile=.artifacts/unit/junit.xml"
1919
},
2020
"dependencies": {
2121
"effect": "catalog:"

packages/kilo-ui/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default defineConfig({
1212
workers: process.env["PLAYWRIGHT_WORKERS"]
1313
? Number.parseInt(process.env["PLAYWRIGHT_WORKERS"]!, 10) || undefined
1414
: undefined,
15-
reporter: [["html", { open: "never" }], ["list"]],
15+
reporter: process.env["CI"] ? [["dot"]] : [["list"]],
1616
use: {
1717
baseURL: "http://localhost:6006",
1818
viewport: { width: 1280, height: 720 },

packages/kilo-vscode/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@
10781078
"check-kilocode-change": "! grep -rIn 'kilocode_change' . ../kilo-ui/ --exclude='package.json' --exclude='*.md' --exclude-dir='node_modules' --exclude-dir='dist' | grep -v '`kilocode_change`'",
10791079
"lint": "eslint src webview-ui",
10801080
"test": "vscode-test",
1081-
"test:unit": "bun test tests/unit/",
1081+
"test:unit": "bun test tests/unit/ --dots",
10821082
"rebuild-sdk": "bun run --cwd ../sdk/js build",
10831083
"storybook": "storybook dev -p 6007",
10841084
"build-storybook": "storybook build -o storybook-static",

packages/kilo-vscode/playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineConfig({
1010
workers: process.env["PLAYWRIGHT_WORKERS"]
1111
? Number.parseInt(process.env["PLAYWRIGHT_WORKERS"]!, 10) || undefined
1212
: undefined,
13-
reporter: [["html", { open: "never" }], ["list"]],
13+
reporter: process.env["CI"] ? [["dot"]] : [["list"]],
1414
use: {
1515
baseURL: "http://localhost:6007",
1616
// VS Code sidebar is typically 350-450px wide

packages/opencode/script/test-runner.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ if (argv.includes("--help") || argv.includes("-h")) {
3232
" --retries <N> Extra attempts for failing files (default: 1)",
3333
" --profile <name> Run a curated test profile (env: KILO_TEST_PROFILE)",
3434
" --bail Stop on first failure",
35+
" --dots Show compact dot progress",
3536
" --verbose Show full output for every file",
3637
" -h, --help Show this help",
3738
"",
@@ -64,6 +65,7 @@ function text(name: string) {
6465
const ci = argv.includes("--ci")
6566
const bail = argv.includes("--bail")
6667
const verbose = argv.includes("--verbose")
68+
const dots = !verbose && (ci || argv.includes("--dots"))
6769
// Cap concurrency at 4 even on bigger runners: the bottleneck is shared
6870
// resources (ports, global filesystem like ~/.local/share/kilo), not CPU.
6971
// Eight parallel processes was triggering port/FS races, not going faster.
@@ -164,6 +166,14 @@ if (ci) await fs.mkdir(xmldir, { recursive: true })
164166

165167
const counter = { done: 0 }
166168
const pad = String(files.length).length
169+
const progress = { width: 80 }
170+
const marks = {
171+
pass: ".",
172+
retry: "R",
173+
fail: "F",
174+
timeout: "T",
175+
} as const
176+
const legend = `Legend: ${marks.pass}=pass ${marks.retry}=pass-after-retry ${marks.fail}=fail ${marks.timeout}=timeout`
167177

168178
// ---------------------------------------------------------------------------
169179
// Run a single test file
@@ -216,8 +226,21 @@ async function run(file: string): Promise<Result> {
216226
// Report a single result
217227
// ---------------------------------------------------------------------------
218228

229+
function mark(result: Result) {
230+
if (result.timedout) return marks.timeout
231+
if (!result.passed) return marks.fail
232+
if (result.attempts > 1) return marks.retry
233+
return marks.pass
234+
}
235+
219236
function report(result: Result) {
220237
counter.done++
238+
if (dots) {
239+
process.stdout.write(mark(result))
240+
if (counter.done % progress.width === 0) process.stdout.write("\n")
241+
return
242+
}
243+
221244
const idx = String(counter.done).padStart(pad)
222245
const secs = (result.duration / 1000).toFixed(1)
223246
const tries = result.attempts > 1 ? dim(` [attempt ${result.attempts}/${retries + 1}]`) : ""
@@ -250,7 +273,9 @@ function report(result: Result) {
250273
// Parallel execution
251274
// ---------------------------------------------------------------------------
252275

253-
console.log(`\nRunning ${bold(String(files.length))} test files with concurrency ${bold(String(concurrency))}\n`)
276+
console.log(`\nRunning ${bold(String(files.length))} test files with concurrency ${bold(String(concurrency))}`)
277+
if (dots) console.log(dim(legend))
278+
console.log()
254279

255280
const start = performance.now()
256281
const results: Result[] = []
@@ -278,6 +303,8 @@ const workers = Array.from({ length: Math.min(concurrency, files.length) }, asyn
278303

279304
await Promise.all(workers)
280305

306+
if (dots && counter.done % progress.width !== 0) console.log()
307+
281308
const elapsed = (performance.now() - start) / 1000
282309

283310
// ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)