Skip to content
Snippets Groups Projects
Commit 8c2aaa42 authored by Viktor Holovachek's avatar Viktor Holovachek
Browse files

Issue #3418265 - Add gitlab CI

parent 7c49817c
No related branches found
No related tags found
1 merge request!5Issue #3418265 - Add gitlab CI
Pipeline #86090 failed
################
# DrupalCI GitLabCI template
#
# Gitlab-ci.yml to replicate DrupalCI testing for Contrib
#
# With thanks to:
# * The GitLab Acceleration Initiative participants
# * DrupalSpoons
################
################
# Guidelines
#
# This template is designed to give any Contrib maintainer everything they need to test, without requiring modification. It is also designed to keep up to date with Core Development automatically through the use of include files that can be centrally maintained.
#
# However, you can modify this template if you have additional needs for your project.
################
################
# Includes
#
# Additional configuration can be provided through includes.
# One advantage of include files is that if they are updated upstream, the changes affect all pipelines using that include.
#
# Includes can be overridden by re-declaring anything provided in an include, here in gitlab-ci.yml
# https://docs.gitlab.com/ee/ci/yaml/includes.html#override-included-configuration-values
################
include:
################
# DrupalCI includes:
# As long as you include this, any future includes added by the Drupal Association will be accessible to your pipelines automatically.
# View these include files at https://git.drupalcode.org/project/gitlab_templates/
################
- project: $_GITLAB_TEMPLATES_REPO
# "ref" value can be:
# - Recommended (default) - `ref: $_GITLAB_TEMPLATES_REF` - The Drupal Association will update this value to the recommended tag for contrib.
# - Latest - `ref: main` - Get the latest additions and bug fixes as they are merged into the templates.
# - Minor or Major latests - `ref: 1.x-latest` or `ref: 1.0.x-latest` - Get the latest additions within a minor (mostly bugfixes) or major (bugs and new features).
# - Fixed tag - `ref: 1.0.1` - Set the value to a known tag. This will not get any updates.
ref: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.yml'
# EXPERIMENTAL: For Drupal 7, remove the above line and uncomment the below.
# - '/includes/include.drupalci.main-d7.yml'
- '/includes/include.drupalci.variables.yml'
- '/includes/include.drupalci.workflows.yml'
################
# Pipeline configuration variables
#
# These are the variables provided to the Run Pipeline form that a user may want to override.
#
# Docs at https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/includes/include.drupalci.variables.yml
################
# variables:
# SKIP_ESLINT: '1'
{
"name": "drupal/points",
"description": "Points module define a Point entity type.",
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"keywords": ["Drupal"],
"homepage": "https://www.drupal.org/project/points",
"authors": [
{
"name": "Jingsheng Wang (skyredwang)",
"homepage": "https://www.drupal.org/u/skyredwang",
"role": "Maintainer"
},
{
"name": "Viktor Holovachek (AstonVictor)",
"homepage": "https://www.drupal.org/u/astonvictor",
"role": "Maintainer"
}
],
"minimum-stability": "dev",
"support": {
"issues": "https://www.drupal.org/project/issues/points",
"source": "https://git.drupalcode.org/project/points"
},
"require": {
"drupal/inline_entity_form": "^3.0@RC"
}
}
...@@ -3,7 +3,6 @@ status: true ...@@ -3,7 +3,6 @@ status: true
dependencies: dependencies:
module: module:
- points - points
- user
id: point_movement id: point_movement
label: 'Point movement' label: 'Point movement'
module: views module: views
......
# Configuration file for PHPStan static code checking.
# @see: https://git.drupalcode.org/project/drupal/-/blob/10.0.x/core/phpstan.neon.dist
parameters:
level: 1
ignoreErrors:
# new static() is a best practice in Drupal, so we cannot fix that.
# @see https://www.drupal.org/docs/develop/development-tools/phpstan/handling-unsafe-usage-of-new-static
- "#^Unsafe usage of new static#"
...@@ -135,4 +135,4 @@ function points_field_config_submit($form, FormStateInterface $form_state) { ...@@ -135,4 +135,4 @@ function points_field_config_submit($form, FormStateInterface $form_state) {
\Drupal::service('plugin.manager.menu.local_task')->clearCachedDefinitions(); \Drupal::service('plugin.manager.menu.local_task')->clearCachedDefinitions();
\Drupal::service('router.builder')->rebuild(); \Drupal::service('router.builder')->rebuild();
} }
} }
\ No newline at end of file
...@@ -66,6 +66,7 @@ class EntityPointsMovementController extends ControllerBase { ...@@ -66,6 +66,7 @@ class EntityPointsMovementController extends ControllerBase {
$entity = $this->entityTypeManager()->getStorage($path[1])->load($path[2]); $entity = $this->entityTypeManager()->getStorage($path[1])->load($path[2]);
$config_entities = $this->entityTypeManager()->getStorage('field_storage_config')->loadMultiple(); $config_entities = $this->entityTypeManager()->getStorage('field_storage_config')->loadMultiple();
$target_id = NULL;
foreach ($config_entities as $config_entity) { foreach ($config_entities as $config_entity) {
$field_name = $config_entity->get('field_name'); $field_name = $config_entity->get('field_name');
if ($config_entity->get('type') === 'entity_reference' && $config_entity->get('settings')['target_type'] === 'point' && $config_entity->get('entity_type') == $path[1] && substr($field_name, 6) == $path[3]) { if ($config_entity->get('type') === 'entity_reference' && $config_entity->get('settings')['target_type'] === 'point' && $config_entity->get('entity_type') == $path[1] && substr($field_name, 6) == $path[3]) {
......
...@@ -20,7 +20,7 @@ class LoadTest extends BrowserTestBase { ...@@ -20,7 +20,7 @@ class LoadTest extends BrowserTestBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
protected static $modules = ['points']; protected static $modules = ['user', 'points'];
/** /**
* A user with permission to administer site configuration. * A user with permission to administer site configuration.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment