[META] Define a default .gitlab-ci.yml template that projects can inherit
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3265092. --> Reported by: [Mixologic](https://www.drupal.org/user/391689) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When configuring testing for a drupal module/theme/distribution etc, there are a lot of steps that are universal to all projects. We can ease project adoption by providing a default .gitlab-ci.yml file.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>There are several considerations that we have to keep in mind:</p> <ul> <li>Environment establishment -&gt; contrib should be able to test against a variety of php versions, database versions, and core versions, as well as define additional environmental service dependencies like solr/elasticsearch, <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/infrastructure/issues/3265115" title="Status: Closed (fixed)">#3265115: Determine how to handle multiple environments in gitlabci</a></span></li> <li>"Scaffolding" the project should be done in the same or similar manner across all projects - this should mostly all happen within the provided template, and not be the responsibility of individual project to implement. What, and how, we scaffold a project is still up for discussion. <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/infrastructure/issues/3265113" title="Status: Closed (fixed)">#3265113: Scaffolding Strategy in GitlabCI for contrib</a></span></li> <li>Test execution - when we execute tests we need to be able to leverage all of the available resources on the testbots, including multiple processors and memory. The execution of tests should probably have one default mechanism. <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/infrastructure/issues/3265116" title="Status: Closed (fixed)">#3265116: Test execution strategies for contrib in drupalci</a></span></li> <li>Coding standards checks - &gt; any codebase validation can also be standardized <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/infrastructure/issues/3265118" title="Status: Closed (fixed)">#3265118: Universal Validation Steps </a></span></li> </ul> <p>Everything can be overridden, of course, but this template should provide *at least* these features so that maintainers do not have to reinvent the wheel over and over again.</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>The base template and include files are here: <a href="https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/gitlab-ci/template.gitlab-ci.yml">https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/gitlab-ci/template.gitlab-ci.yml</a></p> <ul> <li><del>Test the template with volunteer projects</del></li> <li>Enable with general availability for all projects, when testing for modern Drupal contrib is ready</li> <li>Refine testing for modern Drupal core</li> <li>Provide support for legacy Drupal 7 testing</li> <li>Provide support for legacy Drupal 7 contrib</li> </ul>
issue