Problem/Motivation

We've been trying to reproduce core testing with DrupalCI on GitLab CI in this project: https://www.drupal.org/project/gitlab_ci_testbed_for_drupal_core

There are regular updates on the progress in the #gitlab community slack channel as well as in issues created in that project.

We have been able to successfully get to run all of core tests suites and linting checks with MySQL and PosgreSQL (there are issues for SQLite and MariaDB and Drupal 7), so we think that we can start trying GitLab CI for core.

Steps to reproduce

Drupal core is not currently configured to run tests in GitLab CI.

Proposed resolution

Add the GitLab CI related files, and start testing DrupalCI and GitLab CI in parallel. Then consider turning off some DrupalCI tasks when GitLab CI seems stable enough to make the switch.

Remaining tasks

MR.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

Drupal core now runs tests in GitLab CI.

Issue fork drupal-3386076

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Issue summary: View changes
catch’s picture

Status: Active » Needs review
longwave’s picture

Status: Needs review » Needs work

Well, at least it caught some valid typos :)

/var/www/html/.gitlab-ci.yml:28:19 - Unknown word (overriden)
/var/www/html/.gitlab-ci.yml:70:91 - Unknown word (worfklows)
/var/www/html/.gitlab-ci/pipeline.yml:8:9 - Unknown word (Selectig)
/var/www/html/.gitlab-ci/pipeline.yml:10:61 - Unknown word (druaplci)

The others need cspell:ignore I think, or perhaps adding to the dictionary.

longwave’s picture

We should wrap all comments at 80 characters in the YAML files to match our standards.

catch’s picture

Priority: Normal » Critical

This is critical for core test performance and also for Drupal.org gitlab migration, so bumping priority.

Happy to commit this as soon as the comment feedback above is cleaned up and then we can keep going in other issues, and figure out exactly which bits of DrupalCI to switch off.

fjgarlin’s picture

There has been really good progress here: #3386091: [PP-1] Reduce test pipeline times to around 18 minutes and always report back unit tests
We are getting total run times of less than 20 minutes now.

I've suggested that those changes be merged here so we have only one source of truth to review for GitlabCI integration.

larowlan credited mstrelan.

larowlan credited RoSk0.

larowlan’s picture

Crediting those who worked in the sandbox

larowlan’s picture

And those who helped at Drupal south code sprint

catch credited bbrala.

catch’s picture

catch’s picture

Two more nits on the MR, for me the only thing blocking commit of this is the nightwatch failures which seem pretty consistent.

fjgarlin’s picture

Status: Needs work » Needs review

the only thing blocking commit of this is the nightwatch failures

Fixed.

I've also addressed all the feedback that was in the MR that can be addressed from here. There is a comment from @longwave which I don't know if it can be addressed here or in a follow up.

larowlan credited alexpott.

larowlan’s picture

Crediting alex who also worked in the sandbox

larowlan’s picture

longwave’s picture

Status: Needs review » Needs work

Thanks for working on this, this is looking really good. Added some questions and comments, some of which can be dealt with in followups.

poker10’s picture

Added few very minor nits regarding comments/whitespaces to the MR.

catch’s picture

Last commit results in CSpell: Files checked: 1, Issues found: 0 in 0 files which should be correct I think.

catch’s picture

Status: Needs work » Needs review

I think that is probably all feedback resolved. Opened this follow-up #3386841: Reconcile gitlab lint jobs and commit-code-check.sh. Back to needs review.

longwave’s picture

Status: Needs review » Needs work

Some nits around consistency in the templates, but I think this is almost ready for RTBC and continuing improvements in followups.

fjgarlin’s picture

Status: Needs work » Needs review

Addressed all the feedback.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! This looks ready to go, I've gone over all changes a couple of times and can find nothing left to nitpick over - see you all in the followups.

  • catch committed dfa16b8a on 11.x
    Issue #3386076 by fjgarlin, catch, longwave, larowlan, mstrelan,...
catch’s picture

Version: 11.x-dev » 10.1.x-dev

Moving this to 10.1.x for backport. We need to tweak the central gitlab templates so that branch tests actually run after a branch commit, so will backport to 10.1.x as soon as this is done.

  • catch committed abd6c365 on 10.1.x
    Issue #3386076 by fjgarlin, catch, longwave, larowlan, mstrelan,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

11.x pipeline: https://git.drupalcode.org/project/drupal/-/pipelines/19594

10.1.x pipeline: https://git.drupalcode.org/project/drupal/-/pipelines/19603

A bit more work to do before we can switch of DrupalCI but this is a massive improvement in so many ways. Marking fixed!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.