Unit and Kernel tests not running in GitLab CI, wrong PHPUnit version being used.
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3543051. --> Reported by: [rduterte](https://www.drupal.org/user/3809153) Related to !10 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Currently, our module&rsquo;s GitLab CI pipeline runs only Functional tests. Unit and Kernel tests are not executed when commits or Merge Requests are pushed.</p> <p>Additionally, the PHPUnit version used in CI is 11.5.28. Since the module declares core_version_requirement: ^10.1 || ^11, it must support both:</p> <p>Drupal 10.1 with PHPUnit 9.x</p> <p>Drupal 11 with PHPUnit 10+</p> <p>The current setup means we are not testing against Drupal 10.1&rsquo;s minimum supported PHPUnit version, which may lead to incompatibilities.</p> <p>Priority set to Normal since the module&rsquo;s functionality still works, but missing Unit/Kernel coverage and mismatched PHPUnit versions can hide compatibility issues.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>1. Push a commit or open a Merge Request in this project.<br> 2. Check the GitLab CI pipeline results.<br> 3. Observe that only Functional tests are run, and PHPUnit version is fixed at 11.5.28. </p> <p>**Expected:**<br> - Unit, Kernel, and Functional tests should all run.<br> - PHPUnit version should match the minimum required by the targeted Drupal core version(s). </p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>- Update `.gitlab-ci.yml` to ensure Unit and Kernel jobs are included (extending the default DrupalCI templates if needed).<br> - Align PHPUnit versions with Drupal core&rsquo;s requirements:<br> - PHPUnit 9.x for Drupal 10.1<br> - PHPUnit 10+ for Drupal 11</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>- [ ] Confirm current `.gitlab-ci.yml` overrides.<br> - [ ] Update CI config to include Unit and Kernel jobs.<br> - [ ] Verify PHPUnit 9.x jobs run for Drupal 10.1.<br> - [ ] Verify PHPUnit 10+ jobs run for Drupal 11.<br> - [ ] Re-run pipeline to confirm full test coverage. </p> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3>
issue