Skip to content

feat(ci): add macOS e2e testing workflow - #2030

Merged
ericksoa merged 7 commits into
mainfrom
feat/macos-e2e-testing
Apr 17, 2026
Merged

feat(ci): add macOS e2e testing workflow#2030
ericksoa merged 7 commits into
mainfrom
feat/macos-e2e-testing

Conversation

@brandonpelfrey

@brandonpelfrey brandonpelfrey commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add a GitHub Actions workflow that validates the NemoClaw build and vitest suite on the macos-26 (Apple Silicon) runner image, mirroring the WSL E2E pattern from #1715.

Related Issue

Closes #1715 follow-up — extends cross-platform CI coverage to macOS.

Changes

  • Add .github/workflows/macos-e2e.yaml with:
    • macos-26 runner targeting Apple Silicon
    • Node.js 22 setup with npm caching
    • Full CLI + plugin build (build:cli and nemoclaw/npm run build)
    • vitest run with 60 s per-test timeout as the primary gate
    • Conditional Docker detection and full E2E execution when available
    • src/** in path triggers (CLI tests import from dist/ compiled from src/)
    • 30-minute job timeout, concurrency group with cancel-in-progress
    • Triggers on PRs (code paths), pushes to main, and manual dispatch

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with doc updates
  • Doc only (prose changes, no code sample modifications)
  • Doc only (includes code sample changes)

Verification

  • npx prek run --all-files passes
  • npm test passes
  • Tests added or updated for new or changed behavior
  • No secrets, API keys, or credentials committed
  • Docs updated for user-facing behavior changes
  • make docs builds without warnings (doc changes only)
  • Doc pages follow the style guide (doc changes only)
  • New doc pages include SPDX header and frontmatter (new pages only)

AI Disclosure

  • AI-assisted — tool: Claude Code

Signed-off-by: Brandon Pelfrey bpelfrey@nvidia.com

Summary by CodeRabbit

  • Tests
    • Added a macOS end-to-end testing workflow that builds the project, runs unit tests, and conditionally executes full E2E tests when Docker is available.
    • Runs on macOS with a 30-minute timeout, supports manual and CI triggers, enforces concurrency with cancellation, uses Node 22 + Vitest, caches npm, and uploads E2E logs as artifacts on failure.

Add a GitHub Actions workflow that runs the full vitest suite on the
macos-26 (Apple Silicon) runner image. Mirrors the structure of the
WSL E2E workflow added in #1715.

The workflow:
- Triggers on PRs that touch code paths, pushes to main, and manual dispatch
- Installs Node.js 22, builds the CLI and plugin, then runs vitest
- Optionally detects Docker (Colima / Docker Desktop) and runs the
  full E2E suite when available
- Uses a 30-minute timeout and 60s per-test timeout for CI variability
- Includes src/** in path triggers since CLI tests import from dist/

The macOS (Apple Silicon) platform is P0 in the platform matrix and
already marked ci_tested: true. This workflow provides the CI gate
to back that claim.

Signed-off-by: Brandon Pelfrey <bpelfrey@nvidia.com>
@brandonpelfrey brandonpelfrey self-assigned this Apr 17, 2026
@coderabbitai

coderabbitai Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds a new GitHub Actions workflow macos-e2e that runs on macOS runners: checks out code, sets up Node 22 with npm cache, installs and builds packages, runs Vitest, checks Docker availability, and conditionally runs a full E2E script. Triggers: manual, PRs touching specified paths, and pushes to main.

Changes

Cohort / File(s) Summary
macOS E2E Workflow
\.github/workflows/macos-e2e.yaml
Adds new macos-e2e workflow (runs on macos-26, 30m timeout). Defines triggers (workflow_dispatch, pull_request with path filters, push to main), grants contents: read, sets concurrency, checks out repo, sets up Node 22 with npm cache, runs npm ci --ignore-scripts, builds CLI and nemoclaw packages, runs npx vitest run --testTimeout 60000, checks docker info and conditionally runs test/e2e/test-full-e2e.sh with environment/secrets; uploads /tmp/nemoclaw-e2e-*.log on failure.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Runner as macOS Runner
  participant Node as Node.js / npm
  participant Test as Vitest
  participant Docker as Docker Engine
  participant E2E as Full E2E Script

  GH->>Runner: Trigger workflow (dispatch / PR / push)
  Runner->>Runner: checkout repository
  Runner->>Node: setup Node 22 (npm cache)\nnpm ci --ignore-scripts\nbuild steps
  Runner->>Test: npx vitest run --testTimeout 60000
  Runner->>Docker: docker info
  alt Docker available
    Runner->>E2E: run test/e2e/test-full-e2e.sh (env/secrets)
    E2E->>Docker: use containers
    E2E->>Runner: return results
  else Docker unavailable
    Runner->>Runner: skip full E2E (print message)
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I bounced on macOS to build and test,
Cached npm crumbs and ran each quest,
I sniffed for Docker, then skipped or ran the rest,
When failures whisper, logs are packed and pressed,
A happy rabbit hops—CI passed the jest.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a macOS E2E testing workflow to CI configuration.
Linked Issues check ✅ Passed The PR implements cross-platform CI coverage for macOS matching the WSL pattern from #1715, including build steps, vitest execution, Docker detection, E2E shell flow, and proper concurrency controls.
Out of Scope Changes check ✅ Passed All changes are scoped to adding the macOS E2E workflow file with no extraneous modifications or unrelated code changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/macos-e2e-testing

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/macos-e2e.yaml (1)

40-43: Pin actions to full commit SHAs instead of mutable version tags.

@v6 tags can be mutated and retagged; pinning to full commit SHAs (e.g., actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6) prevents unexpected behavior changes and strengthens supply-chain integrity. Update lines 40 and 43 to match the pattern already used in other workflows (e.g., .github/workflows/pr.yaml).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/macos-e2e.yaml around lines 40 - 43, Replace the mutable
tags "uses: actions/checkout@v6" and "uses: actions/setup-node@v6" with the
corresponding full commit SHAs (e.g., "actions/checkout@<full-sha> # v6" and
"actions/setup-node@<full-sha> # v6"); locate the two lines containing the exact
strings uses: actions/checkout@v6 and uses: actions/setup-node@v6 and update
them to the pinned commit SHAs used elsewhere in the repo while preserving the
human-readable tag comment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/macos-e2e.yaml:
- Around line 9-17: The workflow's PR path filter omits lockfiles so PRs that
only change dependencies (e.g., package-lock.json, yarn.lock, pnpm-lock.yaml)
won't trigger the macos-e2e job; update the "paths" list in
.github/workflows/macos-e2e.yaml to include common lockfile names
(package-lock.json, yarn.lock, pnpm-lock.yaml and any repo-specific lockfiles)
so dependency-only changes trigger the workflow; ensure the new entries follow
the existing path list format and don't change other keys.
- Around line 57-58: Replace the `npm install --ignore-scripts` steps with `npm
ci --ignore-scripts` in the workflow to ensure deterministic installs; update
both steps titled "Install root dependencies" and "Install nemoclaw plugin
dependencies" so they use `npm ci --ignore-scripts` instead of `npm install
--ignore-scripts`.

---

Nitpick comments:
In @.github/workflows/macos-e2e.yaml:
- Around line 40-43: Replace the mutable tags "uses: actions/checkout@v6" and
"uses: actions/setup-node@v6" with the corresponding full commit SHAs (e.g.,
"actions/checkout@<full-sha> # v6" and "actions/setup-node@<full-sha> # v6");
locate the two lines containing the exact strings uses: actions/checkout@v6 and
uses: actions/setup-node@v6 and update them to the pinned commit SHAs used
elsewhere in the repo while preserving the human-readable tag comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3965df19-c0b5-4fe2-b8f0-3fe88f595cad

📥 Commits

Reviewing files that changed from the base of the PR and between 1487f5b and b62bbe1.

📒 Files selected for processing (1)
  • .github/workflows/macos-e2e.yaml

Comment thread .github/workflows/macos-e2e.yaml
Comment thread .github/workflows/macos-e2e.yaml Outdated
brandonpelfrey and others added 3 commits April 17, 2026 11:28
Move NEMOCLAW_NON_INTERACTIVE, NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE,
NEMOCLAW_RECREATE_SANDBOX, and NEMOCLAW_SANDBOX_NAME from job-level
env to the full E2E step. These vars leak into test subprocesses via
`...process.env` spreads in spawnSync calls, causing 43 test failures:

- onboard-selection.test.ts (31 tests): NEMOCLAW_NON_INTERACTIVE=1
  forces non-interactive mode which requires NVIDIA_API_KEY
- install-preflight.test.ts (1 test): NEMOCLAW_SANDBOX_NAME=e2e-macos
  replaces the expected default sandbox name in installer output

The WSL workflow avoids this because its vitest step runs inside a
fresh WSL bash session that does not inherit PowerShell-level env vars.

Signed-off-by: Brandon Pelfrey <bpelfrey@nvidia.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@brandonpelfrey
brandonpelfrey requested review from cv and ericksoa April 17, 2026 18:41

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work extending cross-platform CI coverage to macOS — the workflow is clean and well-structured. A few questions and suggestions below to tighten things up before merging.

Comment thread .github/workflows/macos-e2e.yaml Outdated
Comment thread .github/workflows/macos-e2e.yaml
Comment thread .github/workflows/macos-e2e.yaml
Comment thread .github/workflows/macos-e2e.yaml
Comment thread .github/workflows/macos-e2e.yaml
- Pin actions/checkout and actions/setup-node to full commit SHAs
  matching the convention in pr.yaml (supply-chain hardening)
- Use npm ci instead of npm install for deterministic lockfile-only
  installs (both root and nemoclaw plugin)
- Add package-lock.json and nemoclaw/package-lock.json to PR path
  filters so lockfile-only dependency changes trigger the workflow
- Add paths-ignore to push trigger mirroring main.yaml to skip
  docs-only merges (macOS runner minutes are more expensive)
- Add failure artifact upload step mirroring the WSL workflow pattern
  for debugging flaky runs on runners we cannot SSH into

Signed-off-by: Brandon Pelfrey <bpelfrey@nvidia.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/macos-e2e.yaml:
- Around line 105-107: The workflow uses a mutable tag for the upload artifact
action (uses: actions/upload-artifact@v4); replace that mutable tag with the
pinned commit SHA ea165f8d65b6e75b540449e92b4886f43607fa02 so the step that
uploads logs on failure uses an immutable reference; update the uses line to
reference the full SHA and commit the change so the "Upload logs on failure"
step is supply-chain pinned.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: c164e932-6580-4d69-b06f-0b011169e341

📥 Commits

Reviewing files that changed from the base of the PR and between 4a602d5 and 8a2047a.

📒 Files selected for processing (1)
  • .github/workflows/macos-e2e.yaml

Comment thread .github/workflows/macos-e2e.yaml Outdated
brandonpelfrey and others added 2 commits April 17, 2026 13:15
Pin actions/upload-artifact to ea165f8d (v4.6.2) so no action in
the macOS E2E workflow references a mutable tag.

Signed-off-by: Brandon Pelfrey <bpelfrey@nvidia.com>

@ericksoa ericksoa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All review feedback addressed — SHA-pinned actions, npm ci for both installs, lockfile path filters, paths-ignore on push trigger, and artifact upload on failure. CI green. LGTM.

@ericksoa
ericksoa merged commit 30013f0 into main Apr 17, 2026
10 checks passed
@wscurran wscurran added the feature PR adds or expands user-visible functionality label Jun 8, 2026
@cv
cv deleted the feat/macos-e2e-testing branch June 28, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature PR adds or expands user-visible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants