Skip to content

Conversation

@martin-georgiev
Copy link
Owner

@martin-georgiev martin-georgiev commented Aug 18, 2025

Summary by CodeRabbit

  • Tests

    • Added coverage reports for integration tests (HTML and Clover).
    • Standardized unit test coverage output locations to a centralized logs path.
  • Chores

    • CI now uploads coverage to Coveralls in parallel and includes a finalization step for reliability.
    • Switched CI to the standard unit-test command.
    • Simplified Coveralls configuration (consolidated flags, removed redundant options).
    • Removed a deprecated coverage-related test script.

…s; add config for coverage for integration tests; unify coverage paths & remove now obsolete clover script
@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Walkthrough

CI pipeline changed to run unit tests without the Clover flag, upload per-node coverage files in parallel to Coveralls, and add a finalization job; PHPUnit configs add integration coverage and relocate unit coverage outputs; Composer script that emitted Clover was removed.

Changes

Cohort / File(s) Summary of changes
CI workflow & Coveralls
.github/workflows/ci.yml
Replaced composer run-unit-tests-with-clover with composer run-unit-tests; per-node Coveralls uploads now use ./var/logs/test-coverage/unit/clover.xml with parallel: true, flag-name: "Unit", removed base-path, and added a coveralls-finish job (runs after tests, if: always()) with parallel-finished: true.
PHPUnit coverage configs
ci/phpunit/config-unit.xml, ci/phpunit/config-integration.xml
config-unit.xml: moved unit coverage outputs from var/coverage to var/logs/test-coverage/unit (HTML and Clover paths). config-integration.xml: added a <coverage> block writing HTML and Clover to var/logs/test-coverage/integration/....
Composer scripts
composer.json
Removed the run-unit-tests-with-clover script that ran unit tests with --coverage-clover.
Static analysis / CI helper
.scrutinizer.yml
Switched test command to composer run-unit-tests and updated coverage path reference to var/logs/test-coverage/unit/clover.xml.

Sequence Diagram(s)

sequenceDiagram
  participant GH as GitHub Actions
  participant Node as tests (matrix node)
  participant Cover as Coveralls
  participant Finish as coveralls-finish job

  GH->>Node: Run `composer run-unit-tests`
  Node->>Node: Generate clover at ./var/logs/test-coverage/unit/clover.xml
  Node->>Cover: Upload clover file (parallel: true, flag-name: "Unit")
  GH->>Finish: needs: tests (if: always())
  Finish->>Cover: Finalize parallel run (parallel-finished: true)
  Cover-->>GH: Aggregated coverage report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

I hop through logs where clover lies,
Nodes upload in parallel skies,
A final thump to seal the run,
Reports combine, the job is done.
— Your rabbit, padding CI beats 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 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
🪧 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 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.

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

123-126: Coveralls: parallel upload config LGTM; consider explicit format and path mapping (optional)

  • Using file: ./var/logs/test-coverage/unit/clover.xml with parallel: true and a stable flag-name is correct for a one-node coverage upload finalized later.
  • Optional hardening:
    • Explicitly set format: clover (the action typically auto-detects, but this removes ambiguity).
    • If Coveralls shows “Unknown file” mappings, consider setting base-path to github.workspace.

Apply this minimal diff if you prefer being explicit:

       with:
         github-token: ${{ secrets.GITHUB_TOKEN }}
         file: ./var/logs/test-coverage/unit/clover.xml
+        format: clover
         parallel: true
         flag-name: "unit"
         fail-on-error: false

128-137: Finalize Coveralls parallel run — good pattern

Adding a dedicated coveralls-finish job with needs: tests and if: always() correctly finalizes even if the tests job fails. This matches Coveralls’ recommended parallel flow.

If you want to avoid running finalize on workflows where tests are skipped (e.g., release-please), you can make the condition explicit:

-    if: always()
+    if: ${{ always() && needs.tests.result != 'skipped' }}
📜 Review details

Configuration used: .coderabbit.yaml
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 172cc0e and 0b3f945.

📒 Files selected for processing (4)
  • .github/workflows/ci.yml (1 hunks)
  • ci/phpunit/config-integration.xml (1 hunks)
  • ci/phpunit/config-unit.xml (1 hunks)
  • composer.json (0 hunks)
💤 Files with no reviewable changes (1)
  • composer.json
🔇 Additional comments (3)
ci/phpunit/config-unit.xml (1)

24-25: Coverage output path update verified

The composer.json scripts for unit testing correctly reference ./ci/phpunit/config-unit.xml, and there are no remaining references to the old var/coverage paths. Everything is aligned—approving these changes.

ci/phpunit/config-integration.xml (1)

22-27: Integration coverage configuration verified and approved

Nice addition: dedicated integration coverage reports under var/logs/test-coverage/integration.

• composer.json’s run-integration-tests script invokes phpunit:integration
phpunit:integration correctly uses --configuration=./ci/phpunit/config-integration.xml
• The bootstrap file tests/Integration/bootstrap.php exists, ensuring reports will be generated

If/when you decide to publish integration coverage to Coveralls, you can mirror the unit upload with a separate flag (e.g., "integration") and gate it with a matrix condition—let me know if you’d like help drafting those CI steps.

.github/workflows/ci.yml (1)

116-116: Switch to composer run-unit-tests aligns with new phpunit config

This keeps the workflow simpler and relies on the config to emit Clover to the unified path.

Please confirm that run-unit-tests runs phpunit with the ci/phpunit/config-unit.xml so the Clover lands at ./var/logs/test-coverage/unit/clover.xml (see the verification script attached in the config-unit.xml comment).

coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 18, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Aug 18, 2025
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 (1)
.scrutinizer.yml (1)

100-104: Consider removing external_code_coverage to avoid confusion with local Clover ingestion

Since you’re providing a local Clover file via tests.override.coverage, the external_code_coverage tool is likely redundant and can cause ambiguity (Scrutinizer may wait for an upload that never comes). If you’re not uploading coverage externally to Scrutinizer, drop this block.

-tools:
-  external_code_coverage:
-    timeout: 600
-    runs: 1
+
+# tools:
+#   external_code_coverage:
+#     timeout: 600
+#     runs: 1

If you do rely on external uploads, keep this but ensure your CI actually posts to Scrutinizer; otherwise Scrutinizer will time out waiting.

📜 Review details

Configuration used: .coderabbit.yaml
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 6fe3450 and b28d6be.

📒 Files selected for processing (1)
  • .scrutinizer.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
  • GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
  • GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer latest
  • GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer latest
  • GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
  • GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer latest
  • GitHub Check: PHP 8.4 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
  • GitHub Check: PHP 8.4 + Doctrine ORM latest + Doctrine Lexer 3.0
  • GitHub Check: PHP 8.4 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
  • GitHub Check: sloth
  • GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer latest
  • GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 2.1
  • GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 3.0
  • GitHub Check: PHP 8.3 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
  • GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer 2.1
  • GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer latest
  • GitHub Check: PHP 8.2 + Doctrine ORM 3.0 + Doctrine Lexer 3.0
  • GitHub Check: PHP 8.2 + Doctrine ORM latest + Doctrine Lexer latest
  • GitHub Check: PHP 8.1 + Doctrine ORM 2.18 + Doctrine Lexer latest
  • GitHub Check: PHP 8.1 + Doctrine ORM latest + Doctrine Lexer 3.0
🔇 Additional comments (1)
.scrutinizer.yml (1)

11-14: Coverage Path and Script Verification Complete

Confirmed that:

  • composer run-unit-tests invokes the phpunit:unit script (@phpunit --configuration=./ci/phpunit/config-unit.xml).
  • config-unit.xml writes the Clover report to var/logs/test-coverage/unit/clover.xml.
  • The phpunit script is prefixed with XDEBUG_MODE=coverage, ensuring a coverage driver is active.

Everything aligns with the unified coverage paths. ✅

@martin-georgiev martin-georgiev merged commit 342b4a0 into main Aug 18, 2025
99 of 101 checks passed
@martin-georgiev martin-georgiev deleted the ci branch August 18, 2025 22:13
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