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"
composer:
  variables:
    _LENIENT_ALLOW_LIST: "select2, styleguide"
  script:
    - composer config minimum-stability dev
    - composer config repositories.drupal composer https://packages.drupal.org/8
    - composer config --no-plugins allow-plugins.composer/installers true
    - composer config --no-plugins allow-plugins.cweagans/composer-patches true
    - composer config --no-plugins allow-plugins.oomphinc/composer-installers-extender true
    - composer config --no-plugins allow-plugins.phpstan/extension-installer true
    - composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
    - composer require --no-update cweagans/composer-patches:~1
    - composer install -vvv
composer-lint:
  allow_failure: true
cspell:
  stage: validate
  image: node:18
  before_script:
    - npm install -g cspell
  script:
    - cspell "**/*.{php,module,inc,install,test,profile,theme,js,css,md,yml,txt}" --no-progress || true
  allow_failure: true
eslint:
  allow_failure: true
phpcs:
  allow_failure: true
phpstan:
  allow_failure: true
phpunit:
  allow_failure: true