-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathvitest.config.ts
More file actions
72 lines (68 loc) · 2.36 KB
/
vitest.config.ts
File metadata and controls
72 lines (68 loc) · 2.36 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
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0
import { defineConfig } from "vitest/config";
import { testTimeout } from "./test/helpers/timeouts";
const isGithubActions = process.env.GITHUB_ACTIONS === "true";
const isCi = isGithubActions || process.env.CI === "true" || process.env.CI === "1";
export default defineConfig({
test: {
// CI logs are easiest to scan when test chatter stays quiet and failures
// surface as GitHub annotations at the relevant file and line.
reporters: isGithubActions ? ["github-actions"] : ["default"],
silent: isCi,
hideSkippedTests: isCi,
projects: [
{
test: {
name: "cli",
testTimeout: testTimeout(),
include: ["test/**/*.test.{js,ts}", "src/**/*.test.ts"],
exclude: [
"**/node_modules/**",
"**/.claude/**",
"test/e2e/**",
"test/install-preflight.test.ts",
"test/install-openshell-version-check.test.ts",
],
},
},
{
test: {
name: "installer-integration",
include: [
"test/install-preflight.test.ts",
"test/install-openshell-version-check.test.ts",
],
// Slow tests that spawn real bash install.sh processes.
// Run in CI or explicitly: npx vitest run --project installer-integration
// Excluded from pre-commit/pre-push to avoid flaky timeouts.
enabled:
process.env.CI === "true" ||
process.env.CI === "1" ||
process.env.NEMOCLAW_RUN_INSTALLER_TESTS === "1",
},
},
{
test: {
name: "plugin",
include: ["nemoclaw/src/**/*.test.ts"],
},
},
{
test: {
name: "e2e-branch-validation",
include: ["test/e2e/brev-e2e.test.ts"],
// Branch validation E2E: installs from source on a Brev instance.
// Only run when explicitly targeted: npx vitest run --project e2e-branch-validation
enabled: !!process.env.BREV_API_TOKEN,
},
},
],
coverage: {
provider: "v8",
include: ["src/**/*.ts", "bin/**/*.js", "nemoclaw/src/**/*.ts"],
exclude: ["**/*.test.ts", "dist/**"],
reporter: ["text-summary", "json-summary"],
},
},
});