Issue #3614091: Add GitLab CI to 3.0.x and make the test suite actually run

Adds GitLab CI to 3.0.x, and the test work needed to make it meaningful.

Supersedes !16 (closed), which was opened from a branch in the main project rather than from this issue fork and therefore never appeared on the issue. Same commits.

What this does

  • Adds .gitlab-ci.yml using the Drupal Association templates, and deletes the dead drupalci.yml and drupalci.yml_.txt.
  • Runs against Drupal 11 and Drupal 10, since this branch declares ^10 || ^11.
  • Ports a trimmed .cspell.json so that job gives a real signal instead of permanent advisory noise.
  • Fixes two things that prevented the suite from actually running, and backports the unit and kernel tests that only existed on 4.0.x.

Two variables are not the obvious choice

Both are documented in the issue summary and diagnosed in the comments:

  • _PHPUNIT_TESTGROUPS: "--all", not the group name. PHPUnit 10+ ignores doc-comment metadata on any class carrying a PHP attribute, so the Kernel classes' @group was invisible under Drupal 11 and a --group run collected 2 tests instead of 12. Drupal 10 (PHPUnit 9) still collected all 12 — the two majors disagreeing is the only reason it was caught.
  • OPT_IN_TEST_PREVIOUS_MAJOR needs _AUTORUN_PREVIOUS_MAJOR: "all" alongside it, or the Drupal 10 jobs are created as manual stubs that never run.

Result

Verified from the job traces, not the aggregate status:

composer                   Locking drupal/core (11.4.4)
composer (previous major)  Locking drupal/core (10.6.13)
phpunit                    Tests: 28, Assertions: 89      (PHPUnit 11.5.56, PHP 8.3.33)
phpunit (previous major)   OK (28 tests, 91 assertions)   (PHPUnit 9.6.35)

The JUnit artifacts from both jobs were diffed: identical test-case sets, zero symmetric difference. The branch went from 0 collected tests to 28 on both majors.

The advisory lint jobs (phpcs, phpstan on both majors, stylelint, eslint) fail on pre-existing debt and are allow_failure: true, so nothing blocks. Cleanup is tracked in #3614242. cspell passes.

Merges here fast-forward, so Closes #3614091 will not auto-fire — the issue needs closing by hand.

Merge request reports

Loading
Loading