Skip to content

feat: add Windows and macOS to test matrix#234

Merged
shenxianpeng merged 1 commit into
mainfrom
feature/add-windows-macos-ci
May 28, 2026
Merged

feat: add Windows and macOS to test matrix#234
shenxianpeng merged 1 commit into
mainfrom
feature/add-windows-macos-ci

Conversation

@shenxianpeng
Copy link
Copy Markdown
Member

@shenxianpeng shenxianpeng commented May 28, 2026

Summary

Adds windows-latest and macos-latest to the CI test matrix alongside the existing ubuntu-latest.

Changes

  • .github/workflows/test.yml:
    • Added os dimension to the test matrix (ubuntu-latest, windows-latest, macos-latest)
    • Set runs-on to ${{ matrix.os }} (was hardcoded to ubuntu-latest)
    • Set fail-fast: false so one OS failure doesn't cancel others
    • Updated codecov upload condition to only run on ubuntu-latest (was: on any OS with Python 3.13)

Reasoning

  • The project classifiers claim support for Windows, macOS, and Linux — CI should validate each
  • Pre-commit hooks need to work reliably on all major platforms
  • Bash is available on all GitHub runners, so testing/run.sh works cross-platform
  • Pytest tmp_path and uv are fully cross-platform

Closes #TBD

Summary by CodeRabbit

  • Tests
    • Expanded test coverage to run across Ubuntu, Windows, and macOS platforms, ensuring broader compatibility and reliability.

Review Change Stack

@github-actions github-actions Bot added the enhancement New feature or request label May 28, 2026
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 28, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.07%. Comparing base (c595ef7) to head (cf534f6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #234   +/-   ##
=======================================
  Coverage   97.07%   97.07%           
=======================================
  Files           4        4           
  Lines         239      239           
=======================================
  Hits          232      232           
  Misses          7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 28, 2026

Walkthrough

The test workflow is updated to run test jobs across a matrix of three operating systems (Ubuntu, Windows, macOS) with fail-fast: false to allow all platforms to complete. The Codecov upload step is gated to run only on the ubuntu-latest + Python 3.13 combination.

Changes

CI Test Coverage Expansion

Layer / File(s) Summary
Multi-platform test matrix and Codecov gating
.github/workflows/test.yml
Test job strategy adds an os matrix covering ubuntu-latest, windows-latest, and macos-latest with fail-fast disabled. Codecov upload step condition is tightened to require both matrix.os == 'ubuntu-latest' and matrix.python-version == '3.13'.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • cpp-linter/cpp-linter-hooks#56: Both PRs modify the test workflow to run tests across a Python version matrix and gate Codecov upload on Python 3.13.

Suggested labels

enhancement

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
Title check ✅ Passed The PR title clearly describes the main change: expanding the CI test matrix to include Windows and macOS alongside the existing Ubuntu tests.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-windows-macos-ci

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

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

12-17: Consider the CI cost and runtime tradeoff of the expanded matrix.

The matrix expansion from 6 jobs (1 OS × 6 Python versions) to 18 jobs (3 OSes × 6 Python versions) triples the CI minutes consumed per workflow run. Combined with fail-fast: false, failed jobs will not short-circuit the matrix, further increasing costs when failures occur.

This is a reasonable tradeoff for a cross-platform project, but consider:

  • Whether all Python versions need to be tested on all platforms, or if a reduced matrix (e.g., latest Python on all OSes, all Python versions on Linux only) would provide sufficient coverage
  • Monitoring CI minute usage if you're on a limited plan
  • The longer PR feedback cycle (all 18 jobs must complete)

The current approach provides maximum coverage and aligns with the project's declared platform support, so this is acceptable as-is.

🤖 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/test.yml around lines 12 - 17, The CI matrix now
multiplies jobs via the matrix keys (matrix.os and python-version) and with
strategy.fail-fast: false triples runtime and cost; to mitigate, adjust the
matrix to reduce redundant combinations — for example keep python-version matrix
only on Linux (remove python-version from matrix.os entries except ubuntu), or
test only the latest Python on macos and windows while keeping all
python-version values for ubuntu, and/or set strategy.fail-fast: true to
short-circuit on failures; update the workflow matrix and strategy entries
accordingly (refer to matrix.os, python-version, and strategy.fail-fast in the
YAML) to balance coverage vs CI minutes.
🤖 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/test.yml:
- Around line 12-17: The CI matrix now multiplies jobs via the matrix keys
(matrix.os and python-version) and with strategy.fail-fast: false triples
runtime and cost; to mitigate, adjust the matrix to reduce redundant
combinations — for example keep python-version matrix only on Linux (remove
python-version from matrix.os entries except ubuntu), or test only the latest
Python on macos and windows while keeping all python-version values for ubuntu,
and/or set strategy.fail-fast: true to short-circuit on failures; update the
workflow matrix and strategy entries accordingly (refer to matrix.os,
python-version, and strategy.fail-fast in the YAML) to balance coverage vs CI
minutes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 75e5b60a-7fb2-407b-a5ff-f8238e69b515

📥 Commits

Reviewing files that changed from the base of the PR and between c595ef7 and cf534f6.

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

@shenxianpeng shenxianpeng changed the title ci: add Windows and macOS to test matrix feat: add Windows and macOS to test matrix May 28, 2026
@shenxianpeng shenxianpeng merged commit 4296446 into main May 28, 2026
32 of 34 checks passed
@shenxianpeng shenxianpeng deleted the feature/add-windows-macos-ci branch May 28, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant