Skip to content
Snippets Groups Projects
Commit 168967aa authored by Eirik Morland's avatar Eirik Morland
Browse files

Issue #3377670: Use gitlab CI

parent 2a762a10
No related branches found
No related tags found
1 merge request!20Issue #3377670: Use gitlab CI
Pipeline #14969 passed
################
# 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: $_GITLAB_TEMPLATES_REF
file:
- '/includes/include.drupalci.main.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'
_TARGET_CORE: '^9'
_TARGET_PHP: "7.4"
phpstan:
stage: validate
script:
- composer require --dev mglaman/phpstan-drupal phpstan/extension-installer
- vendor/bin/phpstan analyse --level=2 $_WEB_ROOT/modules/custom
allow_failure: false
artifacts:
expose_as: junit
expire_in: 6 mos
when: always
paths:
- junit.xml
reports:
junit: junit.xml
###################################################################################
#
# *
# /(
# ((((,
# /(((((((
# ((((((((((*
# ,(((((((((((((((
# ,(((((((((((((((((((
# ((((((((((((((((((((((((*
# *(((((((((((((((((((((((((((((
# ((((((((((((((((((((((((((((((((((*
# *(((((((((((((((((( .((((((((((((((((((
# ((((((((((((((((((. /(((((((((((((((((*
# /((((((((((((((((( .(((((((((((((((((,
# ,(((((((((((((((((( ((((((((((((((((((
# .(((((((((((((((((((( .(((((((((((((((((
# ((((((((((((((((((((((( ((((((((((((((((/
# (((((((((((((((((((((((((((/ ,(((((((((((((((*
# .((((((((((((((/ /(((((((((((((. ,(((((((((((((((
# *(((((((((((((( ,(((((((((((((/ *((((((((((((((.
# ((((((((((((((, /(((((((((((((. ((((((((((((((,
# (((((((((((((/ ,(((((((((((((* ,(((((((((((((,
# *((((((((((((( .((((((((((((((( ,(((((((((((((
# ((((((((((((/ /((((((((((((((((((. ,((((((((((((/
# ((((((((((((( *(((((((((((((((((((((((* *((((((((((((
# ((((((((((((( ,(((((((((((((..((((((((((((( *((((((((((((
# ((((((((((((, /((((((((((((* /((((((((((((/ ((((((((((((
# ((((((((((((( /((((((((((((/ (((((((((((((* ((((((((((((
# (((((((((((((/ /(((((((((((( ,((((((((((((, *((((((((((((
# (((((((((((((( *(((((((((((/ *((((((((((((. ((((((((((((/
# *((((((((((((((((((((((((((, /(((((((((((((((((((((((((
# ((((((((((((((((((((((((( ((((((((((((((((((((((((,
# .(((((((((((((((((((((((/ ,(((((((((((((((((((((((
# ((((((((((((((((((((((/ ,(((((((((((((((((((((/
# *((((((((((((((((((((( (((((((((((((((((((((,
# ,(((((((((((((((((((((, ((((((((((((((((((((/
# ,(((((((((((((((((((((* /((((((((((((((((((((
# ((((((((((((((((((((((, ,/((((((((((((((((((((,
# ,(((((((((((((((((((((((((((((((((((((((((((((((((((
# .(((((((((((((((((((((((((((((((((((((((((((((
# .((((((((((((((((((((((((((((((((((((,.
# .,(((((((((((((((((((((((((.
#
###################################################################################
{
"name": "drupal/violinist_teams",
"type": "drupal-module",
"require": {
},
"require-dev": {
"drupal/violinist_projects": "*",
"phpspec/prophecy-phpunit": "^2"
}
}
parameters:
level: 2
ignoreErrors:
# We use this all over the place, and it's also recommended by Drupal. In fact, in Drupal core,
# this is also ignored and pointed out as a "best practice". So we actually follow Drupal core here:
# https://git.drupalcode.org/project/drupal/-/commit/fe307a0#04e36328b14584f865afdf63882e263b82222990_0_26
- "#Unsafe usage of new static#"
......@@ -51,6 +51,7 @@ class TeamManager {
// @todo We would have used the constants from the projects module here,
// but we can not depend on that module since that would create a circular
// dependency, really.
->accessCheck(TRUE)
->condition('type', 'project')
->condition('field_team', $node->id())
->execute();
......
......@@ -19,7 +19,6 @@ function violinist_teams_entity_bundle_info_alter(&$bundles) {
$bundles["node"][TeamNode::NODE_TYPE]['class'] = TeamNode::class;
}
/**
* Implements hook_ENTITY_TYPE_delete().
*/
......
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