Skip to content

ci: run the full test suite on macOS instead of two hand-picked files - #483

Open
vinhnguyenthanhdn wants to merge 1 commit into
xiufengsun:mainfrom
vinhnguyenthanhdn:ci/macos-full-suite
Open

ci: run the full test suite on macOS instead of two hand-picked files#483
vinhnguyenthanhdn wants to merge 1 commit into
xiufengsun:mainfrom
vinhnguyenthanhdn:ci/macos-full-suite

Conversation

@vinhnguyenthanhdn

@vinhnguyenthanhdn vinhnguyenthanhdn commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Run the full npm test suite in the macOS CI job instead of two hand-picked test files, so host assumptions that only hold on GNU userland stop shipping green.

Why

CONTRIBUTING.md tells contributors that npm test is the gate ("Full suite, node --test"), and the Linux job runs exactly that. The macOS job runs 2 of the 250 files in test/*.test.js (openclaw-parser, native-pet-limit-reset), so a test that quietly depends on GNU userland is green in CI and red on every Mac.

That is not hypothetical — it is what #482 fixed. test/linux-bundle.test.js landed on 2026-08-09 calling sha256sum, which macOS does not ship. npm test could not go green on macOS for 9 days and no CI leg could see it: the Linux job runs on ubuntu-latest where the command exists, and the macOS job never reached that file.

What this does

In macos-tests, replaces the two named files with the same install → build → test sequence the Linux job already uses:

  • npm ci and npm ci --prefix dashboard
  • npm run dashboard:build — the local-runtime install test asserts dashboard/dist/index.html exists, and a fresh checkout has none
  • npm test

Both previously named files are inside test/*.test.js, so coverage is a strict superset of what the job ran before. The Xcode steps are untouched.

Cost, measured on the runner

From the CI run linked below (macos-26, Node 24), the three added steps:

Step Time
npm ci --prefix dashboard 11s
npm run dashboard:build 8s
npm test 58s

The suite reports tests 2276 · pass 2274 · fail 0 · skipped 2.

The dashboard build is not optional padding: without it the same suite fails 4 tests on macOS — tsc validates migrated TS files, installLocalTrackerApp replaces stale installed runtime and writes a package marker, and the two Vite dev server handles … cases.

Verification

CI run of this exact commit with the upstream workflow, on a fork: https://github.com/vinhnguyenthanhdn/TokenTracker/actions/runs/32090693394

macOS unit tests green including the new Test suite on macOS step, plus test + validate + build and Windows build. Linux client (Rust) was still installing its apt dependencies on the fork runner when this was opened; that job is untouched by this change.

Scope

  • CLI (src/)
  • Dashboard (dashboard/)
  • macOS app (TokenTrackerBar/)
  • Windows app (TokenTrackerWin/)
  • Docs / CI / config

Checklist

  • npm test passes
  • New user-facing strings go through dashboard/src/content/copy.csv (no hardcoded UI text) — none in this PR
  • Commits follow conventional style (feat: / fix: / refactor: / docs: / chore: / test: / ci:)
  • PR description explains why, not just what

Summary by CodeRabbit

  • Tests
    • Expanded macOS continuous integration checks to install all required dependencies, build the dashboard, and run the complete test suite.
    • Replaced targeted test execution with broader validation across the project.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5284fea7-478d-4cb0-bcd2-f82a67a3d8e9

📥 Commits

Reviewing files that changed from the base of the PR and between cd3de81 and 5d4f841.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The macOS CI job now caches both lockfiles, installs root and dashboard dependencies, builds the dashboard with InsForge variables, and runs the complete test suite instead of two targeted test commands.

Changes

macOS CI coverage

Layer / File(s) Summary
macOS dependency and test pipeline
.github/workflows/ci.yml
The macOS job caches both lockfiles, installs root and dashboard dependencies, builds the dashboard with configured InsForge variables, and runs npm test. Previous targeted test commands were removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 5d4f8

This CI-only change expands macOS validation to the full test suite and leaves no actionable merge-blocking risk beyond normal checks and review.

Suggested reviewers: xiufengsun

🚥 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 clearly and concisely describes replacing two selected macOS tests with the full test suite.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant