Skip to content

ci: run phpunit concurrently on Drupal.org with gitlab_templates 1.17.0 - #35

Open
Decipher wants to merge 1 commit into
4.1.xfrom
feature/phpunit-concurrency
Open

Decipher wants to merge 1 commit into
4.1.xfrom
feature/phpunit-concurrency

Conversation

@Decipher

@Decipher Decipher commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Problem

gitlab_templates 1.17.0 made _PHPUNIT_CONCURRENT: 1 the default on Drupal.org. The phpunit job now runs core's run-tests.sh instead of the phpunit binary.

When _RUNTESTS_EXTRA is blank, the template copies _PHPUNIT_EXTRA into it. Our --configuration=phpunit.gitlab-ci.xml becomes a relative --phpunit-configuration. run-tests.sh changes to web/ first, so the file is not found and the job stops before any test runs.

Change

  • Keep _PHPUNIT_EXTRA. The phpunit binary (_PHPUNIT_CONCURRENT: 0) loads phpunit.xml from the project root. That file is the scaffold config for local and GitHub runs. The flag points the binary at the DrupalCI config instead.
  • Add _RUNTESTS_EXTRA: '-'. The - stops the copy. run-tests.sh then uses core's phpunit.xml.dist, which is its default on both 11.4 and 10.6.

GitHub Actions does not read .gitlab-ci.yml or phpunit.gitlab-ci.xml. This PR confirms nothing here changes for it.

Same change as jsonapi_menu_items, tracked in https://git.drupalcode.org/project/jsonapi_menu_items/-/work_items/3591567.

Summary by CodeRabbit

  • Chores
    • Updated automated test-run configuration to keep PHPUnit settings separate from the default concurrent test runner. This maintains the intended test execution behavior in the continuous integration pipeline. There are no changes to application features or behavior for end-users.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 211a51dd-7770-4e06-9578-b06e4e31b618
📥 Commits

Reviewing files that changed from the base of the PR and between 33517f0 and a4ee37b.

📒 Files selected for processing (1)
  • .gitlab-ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The GitLab CI configuration retains _PHPUNIT_EXTRA and sets _RUNTESTS_EXTRA to -. Comments explain how these values apply to the PHPUnit binary and run-tests.sh.

Changes

GitLab CI test configuration

Layer / File(s) Summary
Separate PHPUnit and run-tests.sh options
.gitlab-ci.yml
_PHPUNIT_EXTRA retains its PHPUnit options. _RUNTESTS_EXTRA is set to - to prevent the template from copying _PHPUNIT_EXTRA when run-tests.sh uses its default concurrent mode.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a4ee3

The configuration keeps PHPUnit options separate from run-tests.sh defaults. No identified issue prevents merging.

🚥 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 title clearly describes the main change: enabling concurrent PHPUnit tests on Drupal.org with gitlab_templates 1.17.0.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@codecov

codecov Bot commented Oct 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.58%. Comparing base (33517f0) to head (a4ee37b).

Additional details and impacted files
@@           Coverage Diff           @@
##            4.1.x      #35   +/-   ##
=======================================
  Coverage   78.58%   78.58%           
=======================================
  Files          25       25           
  Lines        1723     1723           
  Branches       64       64           
=======================================
  Hits         1354     1354           
  Misses        366      366           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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