Skip to content

Cleanup ci.yaml matrix usage#7260

Open
ShaharNaveh wants to merge 1 commit intoRustPython:mainfrom
ShaharNaveh:CLN-ci-matrix
Open

Cleanup ci.yaml matrix usage#7260
ShaharNaveh wants to merge 1 commit intoRustPython:mainfrom
ShaharNaveh:CLN-ci-matrix

Conversation

@ShaharNaveh
Copy link
Contributor

@ShaharNaveh ShaharNaveh commented Feb 28, 2026

Summary by CodeRabbit

  • Chores

    • Restructured CI to a matrix-driven configuration for clearer, scalable job definitions and per-OS timeouts.
    • Streamlined job steps and messaging to align with the new matrix flow.
  • Tests

    • Consolidated platform-independent and platform-dependent test handling into matrix entries, replacing multiple OS-specific steps and hard-coded skip lists.
    • Centralized control for env-polluting test checks and per-job test selection.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 8f130eaa-0d96-4c2f-9929-1e4f982c8fed

📥 Commits

Reviewing files that changed from the base of the PR and between f140f63 and 36fed7d.

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

📝 Walkthrough

Walkthrough

Refactors .github/workflows/ci.yaml to replace OS-specific per-test skip and env variables with a matrix-driven job configuration (per-entry os, skips, PLATFORM_INDEPENDENT_TESTS, env_polluting_tests, and timeouts), consolidating test steps and env-polluter checks into matrix-aware steps.

Changes

Cohort / File(s) Summary
CI workflow (matrix-driven)
.github/workflows/ci.yaml
Replaced OS-specific skip/env vars and multiple conditional steps with a matrix.include configuration that provides per-OS skips, PLATFORM_INDEPENDENT_TESTS, env_polluting_tests, and timeouts; unified test execution into matrix-driven steps (platform-independent tests run via matrix-provided list on Linux, platform-dependent tests use dynamic -x exclusions from matrix, and env-polluter checks reference matrix.env_polluting_tests); removed WINDOWS_SKIPS and prior per-OS ENV_POLLUTING_TESTS_* variables and simplified messaging/timeout handling.

Sequence Diagram(s)

sequenceDiagram
    rect rgba(200,230,255,0.5)
    participant GH as GitHub Actions
    participant Matrix as Job Matrix
    participant Runner as OS Runner
    participant Shell as Job Steps
    end
    GH->>Matrix: expand matrix.include entries (os, skips, PLATFORM_INDEPENDENT_TESTS, env_polluting_tests, timeout)
    Matrix->>Runner: select runner for entry (linux/macos/windows)
    Runner->>Shell: run unified job steps
    Shell->>Shell: run platform-independent tests (if defined for entry)
    Shell->>Shell: run platform-dependent tests with dynamic -x exclusions from `skips`
    Shell->>Shell: run env-polluter checks using matrix.env_polluting_tests
    Shell-->>Runner: report results
    Runner-->>GH: job completed
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • youknowone

Poem

🐇 I hopped through YAML, small and bright,

Matrix lanes arranged just right,
Tests now march in single file,
Less hopping, more carrot-style,
A tiny thump — CI's light!

🚥 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 pull request title 'Cleanup ci.yaml matrix usage' clearly and concisely describes the main change: refactoring CI workflow configuration to improve matrix-driven approach.
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
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can generate a title for your PR based on the changes with custom instructions.

Set the reviews.auto_title_instructions setting to generate a title for your PR based on the changes in the PR with custom instructions.

@ShaharNaveh ShaharNaveh marked this pull request as ready for review February 28, 2026 12:52
Copy link
Contributor

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

Caution

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

⚠️ Outside diff range comments (1)
.github/workflows/ci.yaml (1)

343-367: ⚠️ Potential issue | 🟠 Major

ENV_POLLUTING_TESTS_COMMON is referenced but not defined.

Line 346 references ${{ env.ENV_POLLUTING_TESTS_COMMON }}, but this environment variable is not defined anywhere in the file. Combined with matrix.job.env_polluting_tests being set to "" for all matrix entries, the for-loop body will never execute, making this step a silent no-op.

If there are currently no environment-polluting tests to check, consider either:

  1. Defining ENV_POLLUTING_TESTS_COMMON in the env: section (even if empty, for clarity), or
  2. Removing this step entirely if it's no longer needed, or
  3. Adding a comment explaining that this step is intentionally dormant pending future polluting tests.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/ci.yaml around lines 343 - 367, The workflow step's
for-loop references ENV_POLLUTING_TESTS_COMMON and
matrix.job.env_polluting_tests but ENV_POLLUTING_TESTS_COMMON is not defined, so
the loop will be a no-op; fix by defining ENV_POLLUTING_TESTS_COMMON in the
workflow's env: block (even as an empty string) or remove/comment out this step
if it's no longer needed — locate the references to ENV_POLLUTING_TESTS_COMMON
and matrix.job.env_polluting_tests in the CI step that runs rustpython (the for
thing in ... loop) and either add an env: ENV_POLLUTING_TESTS_COMMON: "" entry
at the top-level env or delete/add a clear comment explaining the step is
intentionally dormant.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In @.github/workflows/ci.yaml:
- Around line 343-367: The workflow step's for-loop references
ENV_POLLUTING_TESTS_COMMON and matrix.job.env_polluting_tests but
ENV_POLLUTING_TESTS_COMMON is not defined, so the loop will be a no-op; fix by
defining ENV_POLLUTING_TESTS_COMMON in the workflow's env: block (even as an
empty string) or remove/comment out this step if it's no longer needed — locate
the references to ENV_POLLUTING_TESTS_COMMON and matrix.job.env_polluting_tests
in the CI step that runs rustpython (the for thing in ... loop) and either add
an env: ENV_POLLUTING_TESTS_COMMON: "" entry at the top-level env or delete/add
a clear comment explaining the step is intentionally dormant.

ℹ️ Review info

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5c726e1 and e333638.

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

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