From c8cb84fac1f8fc88cc568809da3a702963223dc6 Mon Sep 17 00:00:00 2001 From: Dave Reid <9593-davereid@users.noreply.drupalcode.org> Date: Fri, 20 Oct 2023 13:43:31 +0000 Subject: [PATCH] Issue #3394970 by Dave Reid: Convert to GitLab CI --- .gitlab-ci.yml | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ composer.json | 3 ++ 2 files changed, 80 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cd2c722 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,77 @@ +# Use the DrupalCI templates. +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' + +# +# Start custom overrides. +# +variables: + # Disable default phpunit job in favor of the d9/10 variants below. + SKIP_PHPUNIT: 1 + # Skip eslint for now. + SKIP_ESLINT: 1 + # Convenient, and we have no secrets. + _SHOW_ENVIRONMENT_VARIABLES: 1 + # Remove this when available upstream. + CORE_PREVIOUS_PHP_MIN: "7.3" + +# Run two variations of composer job. +composer: + parallel: + matrix: + - _TARGET_PHP: [ $CORE_PREVIOUS_PHP_MIN ] + _TARGET_CORE: [ $CORE_PREVIOUS_STABLE ] + - _TARGET_PHP: [ $CORE_PHP_MIN ] + _TARGET_CORE: [ $CORE_STABLE ] + +phpcs: + dependencies: + - "composer: [$CORE_PHP_MIN, $CORE_STABLE]" + +composer-lint: + dependencies: + - "composer: [$CORE_PHP_MIN, $CORE_STABLE]" + +eslint: + dependencies: + - "composer: [$CORE_PHP_MIN, $CORE_STABLE]" + +stylelint: + dependencies: + - "composer: [$CORE_PHP_MIN, $CORE_STABLE]" + +.phpunit-local: + variables: + SKIP_PHPUNIT: 0 + +phpunit-d9: + needs: + - job: composer + parallel: + matrix: + - _TARGET_PHP: $CORE_PREVIOUS_PHP_MIN + _TARGET_CORE: $CORE_PREVIOUS_STABLE + variables: + _TARGET_PHP: $CORE_PREVIOUS_PHP_MIN + extends: + - .phpunit-base + - .phpunit-local + +phpunit-d10: + needs: + - job: composer + parallel: + matrix: + - _TARGET_PHP: $CORE_PHP_MIN + _TARGET_CORE: $CORE_STABLE + variables: + _TARGET_PHP: $CORE_PHP_MIN + extends: + - .phpunit-base + - .phpunit-local + diff --git a/composer.json b/composer.json index 9c40a34..3ed5267 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,9 @@ "description": "Allows any entity to be embedded within a text area using a WYSIWYG editor.", "type": "drupal-module", "license": "GPL-2.0-or-later", + "conflict": { + "drupal/core": "<9.3" + }, "require": { "drupal/embed": "^1.5" }, -- GitLab