Problem/Motivation

Follow the official guide to add a GitLab CI template file to the repository, to change testing to use it instead of Drupal CI:
https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...

Proposed resolution

Add the GitLab CI template file.
Identify what to do from there, whether to change the configuration, e.g. to change the version of MySQL that is used..

Remaining tasks

Add the GitLab CI template file.
Identify what to do from there, whether to change the configuration, e.g. to change the version of MySQL that is used..

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Issue fork metatag-3420192

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

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

damienmckenna’s picture

Title: Adding Gitlab CI template file (D7) » Add Gitlab CI template file (D7)
damienmckenna’s picture

Status: Active » Needs review

fjgarlin made their first commit to this issue’s fork.

fjgarlin’s picture

Assigned: Unassigned » fjgarlin
Status: Needs review » Needs work

Update: I found the reason.

"test_dependencies" modules are not downloaded, so it fails silently. See the job with extra output here: https://git.drupalcode.org/issue/metatag-3420192/-/jobs/867502

GitLab CI no longer brings automatically the test dependencies. For Drupal 10, you need to add them to the "require-dev" section in the "composer.json" file. But we have no mechanism for now to do the same for Drupal 7.

I will work on that issue to make it happen.

fjgarlin’s picture

The tests are now running: https://git.drupalcode.org/issue/metatag-3420192/-/jobs/868201
See the results here: https://git.drupalcode.org/issue/metatag-3420192/-/pipelines/100353/test...
Some of them are successful, some of them fail, but those can be worked on in a follow-up.

We added a new variable to the templates, which can be seen here: https://git.drupalcode.org/project/metatag/-/merge_requests/100/diffs#58...

Note that the issue #3422720: [D7] Test dependencies are not automatically brought is still not merged. It'd be great if you can RTBC it if you are happy with the solution, then we can make the final clean up here (as it is still pointing to the fork instead of the main templates).

fjgarlin’s picture

Status: Needs work » Reviewed & tested by the community

The changes in the related issue were merged into the "gitlab_templates".

That means that the tests should start running here just by running the pipeline again:
- Yesterday: https://git.drupalcode.org/project/metatag/-/jobs/872527 (no tests run)
- Today: https://git.drupalcode.org/issue/metatag-3420192/-/jobs/878468 (tests are running)

Assuming that the test errors would be tackled in separate issue(s), I am marking this one as RTBC.

fjgarlin’s picture

Done with the quick test. Still RTBC.

damienmckenna’s picture

Status: Reviewed & tested by the community » Needs work

The tests still fail, so let's fix this.

jonathan1055’s picture

jonathan1055’s picture

I have done the testing, all successful, and put the values back to the standard

  - project: $_GITLAB_TEMPLATES_REPO
    ref: $_GITLAB_TEMPLATES_REF

The phpunit tests fail in the same way as before, with extra html being piped to the log. I don't know if that is due to a missing test dependency? You could try creating a composer.json with require-dev listing the test dependencies. That might give some other insight into what is going wrong.

fjgarlin’s picture

Before digging much further into individual errors, it'd be great to compare with the current DrupalCI: https://www.drupal.org/node/640498/qa

GitLab CI is running on PHP8.1 by default, so maybe we can change the PHP version of this MR to use the last known passing tests version (PHP7.4).

damienmckenna’s picture

Yeah, some of the dependencies fail with PHP 8.0 due to needing patches.

damienmckenna’s picture

I think we might need to try loading the devel module from D7Security via a composer.json file.

damienmckenna’s picture

Status: Needs work » Closed (won't fix)

I thank you for your contribution to the Metatag module and the Drupal community as a whole. The D7 version of this module is no longer supported, so I am closing this issue.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.