Skip to content

Conversation

@terabytesoftw
Copy link
Contributor

@terabytesoftw terabytesoftw commented Aug 30, 2025

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

Summary by CodeRabbit

  • New Features

    • Added optional hook input to PHPUnit and Codeception workflows to run a custom command; replaces before-hook in PHPUnit.
  • Chores

    • Updated default Windows runner from windows-latest to windows-2022 across relevant workflows.
  • Documentation

    • Updated README examples to use windows-2022 in OS matrices.

@terabytesoftw terabytesoftw added the bug Something isn't working label Aug 30, 2025
@terabytesoftw
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Aug 30, 2025

✅ Actions performed

Review triggered.

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
Copy link

coderabbitai bot commented Aug 30, 2025

Walkthrough

Adds an optional hook input and step to reusable workflows, replaces deprecated before-hook in phpunit workflow, and updates Windows runner defaults from windows-latest to windows-2022 across workflows and README.

Changes

Cohort / File(s) Summary of Changes
Reusable workflows: hook input and execution
.github/workflows/codeception.yml, .github/workflows/phpunit.yml
Introduced hook (string) input under on.workflow_call.inputs. Added a conditional “Run hook” step executing the provided shell command via bash. In phpunit.yml, removed before-hook input and replaced related step with the new hook usage.
OS matrix default update (Windows)
.github/workflows/codeception.yml, .github/workflows/phpunit.yml, .github/workflows/phpunit-database.yml
Changed default os matrix from ["ubuntu-latest","windows-latest"] to ["ubuntu-latest","windows-2022"].
Docs alignment
README.md
Updated example to use windows-2022 in the OS matrix.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller as Workflow Caller
  participant Reusable as Reusable Workflow (phpunit/codeception)
  participant Runner as GitHub Runner
  participant Tests as Test Jobs (Matrix)

  Caller->>Reusable: workflow_call (inputs: os[], hook?)
  Reusable->>Runner: Setup job
  alt hook provided
    Runner->>Runner: Run hook (bash -c "<hook>")
  else no hook
    Note over Runner: Skip hook
  end
  Runner->>Runner: Generate base-class (if applicable)
  par Matrix
    Runner->>Tests: ubuntu-latest job
    Runner->>Tests: windows-2022 job
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers at the queue,
A hook to nibble, neat and new—
Then bounding on to tests I breeze,
From Linux meadows to Win-2022 trees.
Pipelines hop, green lights accrue,
Thump-thump! CI is carrot-true. 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-mini-35

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@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 (4)
.github/workflows/codeception.yml (2)

41-45: New hook input is useful; clarify execution context.

Consider stating in the description that the hook runs in bash on all OSes to avoid confusion on Windows runners.

 hook:
-  description: Hook to run.
+  description: Hook to run (executed with bash on all OS runners; supports multi-line).

111-115: Harden the hook step and support multi-line commands.

Prepend strict bash flags to fail fast and handle multi-line hooks more reliably.

 - name: Run hook.
   if: inputs.hook != ''
-  run: ${{ inputs.hook }}
+  run: |
+    set -euo pipefail
+    ${{ inputs.hook }}
   shell: bash
.github/workflows/phpunit.yml (2)

46-50: New hook input: good addition; minor doc tweak suggested.

 hook:
-  description: Hook to run.
+  description: Hook to run (executed with bash on all OS runners; supports multi-line).

142-146: Apply stricter bash flags for the hook step.

Same rationale as in codeception: fail fast and handle multi-line hooks.

 - name: Run hook.
   if: inputs.hook != ''
-  run: ${{ inputs.hook }}
+  run: |
+    set -euo pipefail
+    ${{ inputs.hook }}
   shell: bash
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 52bedf1 and 0103448.

📒 Files selected for processing (4)
  • .github/workflows/codeception.yml (2 hunks)
  • .github/workflows/phpunit-database.yml (1 hunks)
  • .github/workflows/phpunit.yml (2 hunks)
  • README.md (1 hunks)
🔇 Additional comments (4)
README.md (1)

182-182: Approve update; no windows-latest references remaining
Verified removal of all windows-latest occurrences in code and docs.

.github/workflows/phpunit-database.yml (1)

84-84: Approved: OS matrix updated to “windows-2022” with no remaining references to “windows-latest.”

.github/workflows/codeception.yml (1)

48-48: OS default switch to windows-2022: approved.

.github/workflows/phpunit.yml (1)

53-53: Approved: default OS now includes windows-2022.

@terabytesoftw terabytesoftw merged commit ca24170 into main Aug 30, 2025
1 check passed
@terabytesoftw terabytesoftw deleted the fix-mini-35 branch August 30, 2025 23:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants