From ce723d55a7455cd07447d4752dc6bef0a09d1062 Mon Sep 17 00:00:00 2001
From: Ted Cooper <elc@784944.no-reply.drupal.org>
Date: Fri, 25 Apr 2025 23:47:59 +1000
Subject: [PATCH] [#3521203] Enable GitlabCI.

---
 .gitlab-ci.yml                                | 48 +++++++++++++++++++
 tests/src/Functional/PageCacheTest.php        |  6 ++-
 .../src/Functional/ViewsCacheMetadataTest.php |  5 ++
 3 files changed, 58 insertions(+), 1 deletion(-)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..b84b607
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,48 @@
+################
+# GitLabCI template for Drupal projects.
+#
+# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification.
+# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
+# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your
+# pipelines automatically. However, you can modify this template if you have additional needs for your project.
+# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/
+################
+
+# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/
+# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml
+include:
+  - project: $_GITLAB_TEMPLATES_REPO
+    ref: $_GITLAB_TEMPLATES_REF
+    file:
+      - '/includes/include.drupalci.main.yml'
+      - '/includes/include.drupalci.variables.yml'
+      - '/includes/include.drupalci.workflows.yml'
+
+################
+# Pipeline configuration variables are defined with default values and descriptions in the file
+# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
+# Uncomment the lines below if you want to override any of the variables. The following is just an example.
+################
+variables:
+  _SHOW_ENVIRONMENT_VARIABLES: 1
+  # SKIP_ESLINT: '1'
+  # OPT_IN_TEST_NEXT_MAJOR: '1'
+  # _CURL_TEMPLATES_REF: 'main'
+
+  # Set to 0 to opt out testing against the current Drupal core version.
+  OPT_IN_TEST_CURRENT: 0
+
+  # Set to '1' to opt in testing against various additional Drupal core versions relative to the current stable version of Drupal.
+  OPT_IN_TEST_PREVIOUS_MINOR: 0
+  OPT_IN_TEST_NEXT_MINOR: 0
+  OPT_IN_TEST_PREVIOUS_MAJOR: 1
+  OPT_IN_TEST_NEXT_MAJOR: 0
+
+  # Set to 1 to opt in testing against the maximum/latest supported version of PHP for the current stable version of Drupal.
+  OPT_IN_TEST_MAX_PHP: 0
+
+  # Check compatibility with next major Drupal release.
+  RUN_JOB_UPGRADE_STATUS: 0
+
+  # Run concurrent phpunit.
+  _PHPUNIT_CONCURRENT: 0
diff --git a/tests/src/Functional/PageCacheTest.php b/tests/src/Functional/PageCacheTest.php
index d0c9ae0..00432bf 100644
--- a/tests/src/Functional/PageCacheTest.php
+++ b/tests/src/Functional/PageCacheTest.php
@@ -18,6 +18,11 @@ class PageCacheTest extends BrowserTestBase {
 
   protected static $modules = ['views', 'views_advanced_cache_test'];
 
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
   protected $strictConfigSchema = FALSE;
 
   /**
@@ -47,7 +52,6 @@ class PageCacheTest extends BrowserTestBase {
       'config:views.view.views_advanced_cache_test',
       'http_response',
       'rendered',
-      'user:0',
       'vact:node_list:test',
     ];
 
diff --git a/tests/src/Functional/ViewsCacheMetadataTest.php b/tests/src/Functional/ViewsCacheMetadataTest.php
index a78aa46..3be6e78 100644
--- a/tests/src/Functional/ViewsCacheMetadataTest.php
+++ b/tests/src/Functional/ViewsCacheMetadataTest.php
@@ -17,6 +17,11 @@ class ViewsCacheMetadataTest extends BrowserTestBase {
 
   protected static $modules = ['views', 'views_advanced_cache_test'];
 
+  /**
+   * {@inheritdoc}
+   */
+  protected $defaultTheme = 'stark';
+
   protected $strictConfigSchema = FALSE;
 
   // # Tests.
-- 
GitLab