Skip to content

chore: add Windows/macOS CI matrix#82

Merged
isamu merged 1 commit intomainfrom
chore/ci-cross-platform
Feb 9, 2026
Merged

chore: add Windows/macOS CI matrix#82
isamu merged 1 commit intomainfrom
chore/ci-cross-platform

Conversation

@isamu
Copy link
Copy Markdown
Contributor

@isamu isamu commented Feb 9, 2026

Summary

  • Add OS matrix (ubuntu, macos, windows) and Node.js 22/24 to CI
  • Add .gitattributes for consistent LF line endings (Windows fix)

Test plan

  • CI passes on all 6 matrix combinations

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Configured consistent line ending handling across development environments.
    • Expanded build and test coverage to multiple operating systems and Node.js versions to ensure compatibility and stability across different platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 9, 2026

📝 Walkthrough

Walkthrough

Adds a line ending configuration file to enforce consistent text formatting across platforms and enhances the CI/CD workflow to test against multiple operating systems (Ubuntu, macOS, Windows) and Node.js versions (22.x, 24.x) using a matrix strategy with fail-fast disabled.

Changes

Cohort / File(s) Summary
Configuration Files
.gitattributes
New file added to enforce consistent line endings with text=auto eol=lf for all files across platforms.
CI/CD Workflow
.github/workflows/build.yml
Converts static runner specification to dynamic matrix strategy spanning three operating systems and two Node.js versions. Sets fail-fast to false to continue testing all matrix combinations even if one fails.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Hop, hop, hooray! The workflows now dance,
Across Linux, Mac, and Windows—each gets a chance.
Line endings tamed with .gitattributes grace,
Node versions 22 and 24 join the race!
No fail-fast rushing, let all tests complete,
Consistency and coverage—our success is sweet! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: adding Windows/macOS to the CI matrix in the GitHub workflow file.
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
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/ci-cross-platform

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
.github/workflows/build.yml (2)

25-29: cache: 'npm' is used but the project installs with yarn.

Line 25 caches npm artifacts, but line 29 runs yarn install. This means the cache likely provides no benefit (yarn has its own cache directory). This is pre-existing, but now that the matrix multiplies the job count to 6, the wasted setup time is amplified.

Consider changing to cache: 'yarn' to actually speed up installs across the matrix.

Proposed fix
       with:
         node-version: ${{ matrix.node-version }}
-        cache: 'npm'
+        cache: 'yarn'

26-28: Verify that cp and mkdir commands work on the Windows runner.

These Unix commands happen to work on Windows because GitHub Actions defaults to PowerShell, where cp is aliased to Copy-Item and mkdir works natively. However, this is fragile — if the default shell ever changes or someone adds shell: cmd, these steps will break.

For robustness, consider either explicitly setting shell: bash on these steps (GitHub Actions provides Git Bash on Windows runners) or using a cross-platform approach.

Option: explicit bash shell
-    - run: cp packages/grapys-vue/src/config/game-dev.ts packages/grapys-vue/src/config/project.ts
-    - run: mkdir packages/grapys-react/src/config
-    - run: cp packages/grapys-vue/src/config/game-dev.ts packages/grapys-react/src/config/project.ts
+    - run: cp packages/grapys-vue/src/config/game-dev.ts packages/grapys-vue/src/config/project.ts
+      shell: bash
+    - run: mkdir -p packages/grapys-react/src/config
+      shell: bash
+    - run: cp packages/grapys-vue/src/config/game-dev.ts packages/grapys-react/src/config/project.ts
+      shell: bash

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 and usage tips.

@isamu isamu merged commit 06b3bca into main Feb 9, 2026
9 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