Skip to content

ci: add cross-platform CI matrix (Linux/macOS/Windows)#402

Merged
ByteYue merged 3 commits intomainfrom
feat/cross-platform-ci
Mar 25, 2026
Merged

ci: add cross-platform CI matrix (Linux/macOS/Windows)#402
ByteYue merged 3 commits intomainfrom
feat/cross-platform-ci

Conversation

@ByteYue
Copy link
Copy Markdown
Collaborator

@ByteYue ByteYue commented Mar 25, 2026

Summary

Add OS matrix (ubuntu-latest, macos-latest, windows-latest) to the build, unit-test, and adapter-test CI jobs. This ensures cross-platform compatibility is verified on every push and PR.

Changes

  • build: runs on all 3 OS platforms
  • unit-test: runs on all 3 OS × 2 Node versions × 2 shards (12 jobs total)
  • adapter-test: runs on all 3 OS platforms
  • smoke-test: unchanged (Linux-only, depends on xvfb)

Motivation

All CI jobs previously ran exclusively on ubuntu-latest, providing zero Windows/macOS test coverage. Issue #392 demonstrated that real Windows path bugs (URL.pathname, symlink permissions, esbuild resolution) went undetected until users reported them.

Cost

Since opencli is a public repository, GitHub Actions minutes are free for all runner types.

Relates to #392

ByteYue added 3 commits March 25, 2026 10:32
…st, adapter-test

Add OS matrix with ubuntu-latest, macos-latest, and windows-latest to
the build, unit-test, and adapter-test CI jobs. This ensures cross-
platform compatibility is verified on every push and PR.

Smoke tests remain Linux-only due to xvfb dependency.

Relates to #392 (Windows plugin path issues).
Fix Windows CI failures caused by hardcoded '/tmp' paths that don't
exist on Windows. Use os.tmpdir() which returns the correct platform-
specific temp directory on all operating systems.

Files fixed:
- src/engine.test.ts: 3 occurrences (mkdtemp, discoverClis path)
- src/plugin.test.ts: 2 occurrences (getCommitHash test, mock condition)
- engine.test.ts: use pathToFileURL().href for dynamic import paths
  (path.join produces backslashes on Windows, breaking ES module imports)
- download.test.ts: replace hardcoded '/tmp' with os.tmpdir() + path.join
@ByteYue ByteYue merged commit 4eeed2d into main Mar 25, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant