Skip to content

Add Windows CI testing#2

Merged
VariableThe merged 3 commits into
VariableThe:mainfrom
blackfang007:add-windows-ci
Jun 8, 2026
Merged

Add Windows CI testing#2
VariableThe merged 3 commits into
VariableThe:mainfrom
blackfang007:add-windows-ci

Conversation

@blackfang007

@blackfang007 blackfang007 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Windows to the GitHub Actions CI matrix so that linting, formatting checks, tests, and builds are validated on both Ubuntu and Windows.

Motivation

The current CI workflow only runs on ubuntu-latest. Adding Windows CI helps catch platform-specific issues early and improves support for Windows contributors and users.

Changes

  • Added a build matrix for:

    • ubuntu-latest
    • windows-latest
  • Existing CI steps remain unchanged:

    • Install dependencies
    • Run linter
    • Check formatting
    • Run tests
    • Build project

Testing

Verified the workflow configuration locally before submitting the PR.

Summary by CodeRabbit

  • Chores
    • Enhanced continuous integration pipeline to validate builds across multiple operating systems (Ubuntu and Windows), improving cross-platform compatibility verification. The build-and-test job now runs across an OS matrix while retaining the existing build step, ensuring consistent build and test validation on both platforms.

@coderabbitai

coderabbitai Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@blackfang007, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 52 minutes and 41 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 94d7d6e4-4671-4809-ba08-2431c92218e3

📥 Commits

Reviewing files that changed from the base of the PR and between 29ab65d and 2439b44.

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

Walkthrough

The CI workflow now runs the build-and-test job on a matrix of OS runners (ubuntu-latest, windows-latest) by using strategy.matrix and changing runs-on to ${{ matrix.os }}; step indentation/whitespace for the build step was also adjusted.

Changes

CI Cross-Platform Testing Matrix

Layer / File(s) Summary
Multi-OS test matrix configuration
.github/workflows/ci.yml
Job strategy adds a matrix over os (ubuntu-latest, windows-latest) and runs-on is changed from a fixed runner to ${{ matrix.os }}. Small whitespace/step formatting adjusted for the build step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through YAML, neat and spry,
Two OSes now under one sky,
Ubuntu, Windows — side by side,
CI hums along, a joyful ride.

🚥 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 pull request title 'Add Windows CI testing' directly and clearly summarizes the main change: introducing Windows testing to the CI pipeline alongside the existing Ubuntu testing.
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.

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

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

@VariableThe

Copy link
Copy Markdown
Owner

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/workflows/ci.yml (2)

10-40: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add explicit permissions block to follow least-privilege principle.

The workflow uses default permissions, which are overly broad. Explicitly define the minimum required permissions to improve security posture.

🔒 Proposed fix to add explicit permissions
 jobs:
   build-and-test:
+    permissions:
+      contents: read
+
     strategy:
       matrix:
         os: [ubuntu-latest, windows-latest]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 10 - 40, Add an explicit permissions
block to the GitHub Actions workflow (for the build-and-test job) to avoid
default broad permissions: identify which token permissions your steps need
(e.g., contents: read for checkout, actions: read if using actions, id-token:
write only if OIDC is used, packages: read if fetching packages, checks: write
if creating check runs) and add a top-level permissions: map or a job-level
permissions: map just above the steps in the build-and-test job to grant only
those scopes; update the job named build-and-test so the workflow uses the
minimal required permissions for the actions/checkout, setup-node, and any
publishing or status-reporting steps.

Source: Linters/SAST tools


33-34: ⚠️ Potential issue | 🟡 Minor

Ensure Prettier line endings don’t break format:check on Windows.

npm run format:check runs prettier --check ., but the repo has no .gitattributes and .prettierrc doesn’t set endOfLine. With default Git checkout behavior on windows-latest, files can end up with CRLF and cause Prettier --check to fail. Set endOfLine explicitly in .prettierrc (e.g., "lf") and/or add a .gitattributes rule to normalize line endings.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 33 - 34, The CI formatting check fails
on Windows due to CRLF line endings; update project config so Prettier's
`--check` (invoked by the `format:check` npm script) is deterministic: add an
explicit endOfLine setting (e.g., "lf") to your .prettierrc and/or add a
.gitattributes entry to normalize line endings (e.g., `* text=auto eol=lf`) so
files checked by the workflow step named "Check formatting" always use the
expected line endings.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

10-40: ⚡ Quick win

Add concurrency group to cancel outdated workflow runs.

Adding a concurrency group will automatically cancel in-progress runs when new commits are pushed, saving CI resources and reducing confusion from stale runs.

⚡ Proposed optimization to add concurrency control
 jobs:
   build-and-test:
+    concurrency:
+      group: ${{ github.workflow }}-${{ github.ref }}
+      cancel-in-progress: true
+
     strategy:
       matrix:
         os: [ubuntu-latest, windows-latest]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 10 - 40, Add a concurrency block to
the workflow (preferably at the job level for the build-and-test job) to cancel
outdated runs: inside the build-and-test job (the job with id "build-and-test")
add a concurrency: section with group: set to a stable identifier like "${{
github.workflow }}-${{ github.ref }}" and cancel-in-progress: true so any
in-progress build-and-test run for the same ref is cancelled when a new run
starts; ensure indentation matches the existing YAML structure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 10-40: Add an explicit permissions block to the GitHub Actions
workflow (for the build-and-test job) to avoid default broad permissions:
identify which token permissions your steps need (e.g., contents: read for
checkout, actions: read if using actions, id-token: write only if OIDC is used,
packages: read if fetching packages, checks: write if creating check runs) and
add a top-level permissions: map or a job-level permissions: map just above the
steps in the build-and-test job to grant only those scopes; update the job named
build-and-test so the workflow uses the minimal required permissions for the
actions/checkout, setup-node, and any publishing or status-reporting steps.
- Around line 33-34: The CI formatting check fails on Windows due to CRLF line
endings; update project config so Prettier's `--check` (invoked by the
`format:check` npm script) is deterministic: add an explicit endOfLine setting
(e.g., "lf") to your .prettierrc and/or add a .gitattributes entry to normalize
line endings (e.g., `* text=auto eol=lf`) so files checked by the workflow step
named "Check formatting" always use the expected line endings.

---

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 10-40: Add a concurrency block to the workflow (preferably at the
job level for the build-and-test job) to cancel outdated runs: inside the
build-and-test job (the job with id "build-and-test") add a concurrency: section
with group: set to a stable identifier like "${{ github.workflow }}-${{
github.ref }}" and cancel-in-progress: true so any in-progress build-and-test
run for the same ref is cancelled when a new run starts; ensure indentation
matches the existing YAML structure.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44ae9176-e27a-4029-9e34-a3976a203212

📥 Commits

Reviewing files that changed from the base of the PR and between 58c7041 and a5dc15e.

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

@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.

🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)

27-28: ⚡ Quick win

Use npm ci in CI for deterministic cross-OS installs.

npm install can produce non-reproducible dependency resolution between runners. In CI, npm ci is safer and faster when a lockfile is present.

Proposed change
-      - name: Install dependencies
-        run: npm install
+      - name: Install dependencies
+        run: npm ci
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 27 - 28, Replace the CI step that
currently runs "npm install" with "npm ci" to ensure deterministic, faster
installs using the lockfile; locate the GitHub Actions step named "Install
dependencies" (the run: npm install line) and change the command to run: npm ci
so the workflow uses the lockfile for reproducible cross-OS installs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 27-28: Replace the CI step that currently runs "npm install" with
"npm ci" to ensure deterministic, faster installs using the lockfile; locate the
GitHub Actions step named "Install dependencies" (the run: npm install line) and
change the command to run: npm ci so the workflow uses the lockfile for
reproducible cross-OS installs.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fe81956b-f3e6-4bbc-8738-71dbfd19e28b

📥 Commits

Reviewing files that changed from the base of the PR and between a5dc15e and 29ab65d.

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

@VariableThe VariableThe merged commit 205494c into VariableThe:main Jun 8, 2026
3 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.

2 participants