Skip to content
Snippets Groups Projects
Commit c4adef48 authored by Patrick Kenny's avatar Patrick Kenny Committed by Damien McKenna
Browse files

Issue #3450099 by ptmkenny, DamienMcKenna: Require phpcs, composer-lint,...

Issue #3450099 by ptmkenny, DamienMcKenna: Require phpcs, composer-lint, cspell, phpstan and stylelint to pass.
parent bf209a3f
Branches
Tags
1 merge request!26Require phpcs and cspell to pass
Pipeline #183449 passed with warnings
################ ################
# GitLabCI template for Drupal projects. # GitLabCI template for Drupal projects.
# #
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. # This template is designed to give any Contrib maintainer everything they need
# It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained. # to test, without requiring modification. It is also designed to keep up to
# As long as you include the project, ref and three files below, any future updates added by the Drupal Association will be used in your # date with Core Development automatically through the use of include files
# pipelines automatically. However, you can modify this template if you have additional needs for your project. # that can be centrally maintained. As long as you include the project, ref and
# The full documentation is on https://project.pages.drupalcode.org/gitlab_templates/ # three files below, any future updates added by the Drupal Association will be
# used in your pipelines automatically. However, you can modify this template
# if you have additional needs for your project. The full documentation is on
# https://project.pages.drupalcode.org/gitlab_templates/
################ ################
# For information on alternative values for 'ref' see https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/ # For information on alternative values for 'ref' see:
# To test a Drupal 7 project, change the first include filename from .main.yml to .main-d7.yml # https://project.pages.drupalcode.org/gitlab_templates/info/templates-version/
include: include:
- project: $_GITLAB_TEMPLATES_REPO - project: $_GITLAB_TEMPLATES_REPO
ref: $_GITLAB_TEMPLATES_REF ref: $_GITLAB_TEMPLATES_REF
...@@ -18,18 +21,31 @@ include: ...@@ -18,18 +21,31 @@ include:
- "/includes/include.drupalci.variables.yml" - "/includes/include.drupalci.variables.yml"
- "/includes/include.drupalci.workflows.yml" - "/includes/include.drupalci.workflows.yml"
# Require additional tests to pass.
composer-lint:
allow_failure: false
cspell:
allow_failure: false
phpcs:
allow_failure: false
phpstan:
allow_failure: false
stylelint:
allow_failure: false
################ ################
# Pipeline configuration variables are defined with default values and descriptions in the file # Pipeline configuration variables are defined with default values and
# descriptions in the file
# https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml # https://git.drupalcode.org/project/gitlab_templates/-/blob/main/includes/include.drupalci.variables.yml
# Uncomment the lines below if you want to override any of the variables. The following is just an example. # Uncomment the lines below if you want to override any of the variables. The
# following is just an example.
################ ################
variables: variables:
_CSPELL_WORDS: 'josdejong,jsoneditor,jsonview,quickedit,Swaggest,yesmeck' _CSPELL_WORDS: 'dawehner,Jesin,josdejong,jsoneditor,jsonview,McKenna,quickedit,Swaggest,yesmeck'
OPT_IN_TEST_MAX_PHP: '1' OPT_IN_TEST_MAX_PHP: '1'
OPT_IN_TEST_NEXT_MINOR: '1'
OPT_IN_TEST_PREVIOUS_MAJOR: '1' OPT_IN_TEST_PREVIOUS_MAJOR: '1'
OPT_IN_TEST_PREVIOUS_MINOR: '1' OPT_IN_TEST_PREVIOUS_MINOR: '1'
# SKIP_ESLINT: '1' # Disable the next phpstan minor release as it would involve breaking
# OPT_IN_TEST_NEXT_MAJOR: '1' # compatibility with D9 and < 10.3.
# _CURL_TEMPLATES_REF: 'main' # @see https://www.drupal.org/project/json_field/issues/3450162
# OPT_IN_TEST_NEXT_MINOR: '1'
...@@ -6,6 +6,8 @@ JSON Field 8.x-1.x-dev, 2024-xx-xx ...@@ -6,6 +6,8 @@ JSON Field 8.x-1.x-dev, 2024-xx-xx
organized in alphabetical order as per standard coding practices. organized in alphabetical order as per standard coding practices.
#3448199 by ptmkenny, DamienMcKenna: Fix library warning method name. #3448199 by ptmkenny, DamienMcKenna: Fix library warning method name.
#3450101 by DamienMcKenna: Coding standards fixes. #3450101 by DamienMcKenna: Coding standards fixes.
#3450099 by ptmkenny, DamienMcKenna: Require phpcs, composer-lint, cspell,
phpstan and stylelint to pass.
JSON Field 8.x-1.3, 2023-08-09 JSON Field 8.x-1.3, 2023-08-09
......
name: 'JSON Field Widget Test Helper' name: 'JSON Field Widget Test Helper'
type: module type: module
description: 'Extra logic to make testing the widgete.' description: 'Extra logic to make testing the widget.'
package: Testing package: Testing
dependencies: dependencies:
- drupal:node - drupal:node
......
...@@ -6,7 +6,7 @@ use Drupal\Component\Serialization\Json; ...@@ -6,7 +6,7 @@ use Drupal\Component\Serialization\Json;
use Drupal\Tests\BrowserTestBase; use Drupal\Tests\BrowserTestBase;
/** /**
* Verify that JSON Field widget UI works as expected * Verify that JSON Field widget UI works as expected.
* *
* @group json_field * @group json_field
*/ */
......
...@@ -72,7 +72,7 @@ class JsonFieldRequirements implements JsonFieldRequirementsInterface { ...@@ -72,7 +72,7 @@ class JsonFieldRequirements implements JsonFieldRequirementsInterface {
$version_query = 'SHOW server_version'; $version_query = 'SHOW server_version';
} }
elseif ($driver === 'sqlite') { elseif ($driver === 'sqlite') {
$version_query = 'select sqlite_version()'; $version_query = 'select sqlite_version()';
} }
$driver_version = $this->connection->query($version_query)->fetchCol(); $driver_version = $this->connection->query($version_query)->fetchCol();
$is_compatible = version_compare($driver_version[0], $minimum_version_required); $is_compatible = version_compare($driver_version[0], $minimum_version_required);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment