Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/platform-vitest-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ jobs:
stat --version | head -n 1
awk --version | head -n 1

- name: Install pinned OpenShell
env:
NEMOCLAW_NON_INTERACTIVE: "1"
run: env -u GH_TOKEN -u GITHUB_TOKEN bash scripts/install-openshell.sh

- name: Install dependencies
run: |
npm ci --ignore-scripts
Expand Down
6 changes: 5 additions & 1 deletion src/lib/onboard/gateway-host-runtime.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import { afterEach, describe, expect, it, vi } from "vitest";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";

import { createGatewayHostRuntime, type GatewayHostRuntimeDeps } from "./gateway-host-runtime";
import { GATEWAY_MANAGEMENT_ENV_VAR } from "./gateway-management";
Expand Down Expand Up @@ -29,6 +29,10 @@ const DECLARATION = {

const ORIGINAL_ENV = { ...process.env };

beforeEach(() => {
vi.spyOn(process, "platform", "get").mockReturnValue("linux");
});

afterEach(() => {
process.env = { ...ORIGINAL_ENV };
vi.restoreAllMocks();
Expand Down
7 changes: 4 additions & 3 deletions test/e2e/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ test/e2e/
reporting and scorecards. The workflow boundary requires every selected job
shard to upload its evidence artifact.
- `.github/workflows/platform-vitest-main.yaml` runs the full Vitest suite in
four independent shards on each of macOS and WSL. Each macOS shard has a
30-minute budget, each WSL shard has a 90-minute budget, and WSL runs its
additional root-required contracts on shard 1 only.
four independent shards on each of macOS and WSL, with `fail-fast` disabled.
Each macOS shard installs the pinned OpenShell formula and has a 30-minute
budget. Each WSL shard has a 90-minute budget, and WSL runs its additional
root-required contracts on shard 1 only.
`.github/workflows/e2e-branch-validation.yaml`, `macos-e2e.yaml`,
`wsl-e2e.yaml`, and `regression-e2e.yaml` call focused E2E targets directly
for their E2E coverage. Individual repository-hosted targets, including
Expand Down
3 changes: 3 additions & 0 deletions test/onboard-exit-handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type OnboardModule = typeof import("../src/lib/onboard") & {
const require = createRequire(import.meta.url);
const onboard = require("../src/lib/onboard.js") as OnboardModule;
const onboardSession = onboard.onboardSession;
const ONBOARD_FIXTURE_PATH = ["/usr/bin", "/bin"].join(path.delimiter);
const originalHome = process.env.HOME;
const restoreOriginalHome =
originalHome === undefined
Expand Down Expand Up @@ -175,6 +176,7 @@ const { onboard } = require(${onboardPath});
env: {
...process.env,
HOME: tmpDir,
PATH: ONBOARD_FIXTURE_PATH,
TMPDIR: tmpDir,
NEMOCLAW_TEST_NO_SLEEP: "1",
},
Expand Down Expand Up @@ -330,6 +332,7 @@ const { onboard } = require(${onboardPath});
env: {
...process.env,
HOME: tmpDir,
PATH: ONBOARD_FIXTURE_PATH,
TMPDIR: tmpDir,
NEMOCLAW_TEST_NO_SLEEP: "1",
NEMOCLAW_OPENSHELL_BIN: openshellPath,
Expand Down
10 changes: 10 additions & 0 deletions test/platform-vitest-main-workflow.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ describe("platform Vitest main workflow", () => {
const checkout = step("macos-vitest", "Checkout");
const setupPython = step("macos-vitest", "Setup Python");
const install = step("macos-vitest", "Install macOS test dependencies");
const installOpenShell = step("macos-vitest", "Install pinned OpenShell");
const run = install.run ?? "";

expect(job("macos-vitest")["timeout-minutes"]).toBe(30);
Expand All @@ -49,6 +50,9 @@ describe("platform Vitest main workflow", () => {
stepNames.indexOf("Install macOS test dependencies"),
);
expect(stepNames.indexOf("Install macOS test dependencies")).toBeLessThan(
stepNames.indexOf("Install pinned OpenShell"),
);
expect(stepNames.indexOf("Install pinned OpenShell")).toBeLessThan(
stepNames.indexOf("Run full Vitest suite on macOS"),
);
expect(setupPython.uses).toBe("actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97");
Expand All @@ -66,6 +70,12 @@ describe("platform Vitest main workflow", () => {
expect(run).toContain("--only-binary=:all:");
expect(run).toContain("--require-hashes");
expect(run).toContain(`--requirement ${MACOS_REQUIREMENTS_PATH}`);
expect(installOpenShell.env).toMatchObject({
NEMOCLAW_NON_INTERACTIVE: "1",
});
expect(installOpenShell.run).toBe(
"env -u GH_TOKEN -u GITHUB_TOKEN bash scripts/install-openshell.sh",
);
expect(step("macos-vitest", "Run full Vitest suite on macOS").run).toContain(
'--shard="${{ matrix.shard }}/4"',
);
Expand Down
Loading