Commit 2713ff97 authored by Ines WALLON's avatar Ines WALLON
Browse files

feat: add merge request in gitlab-ci

parent 225393e8
Pipeline #729 passed with stage
in 2 minutes and 3 seconds
......@@ -26,4 +26,5 @@ include:
#- local: config/.gitlab/code_quality_php8.yml
- local: config/.gitlab/code_quality_front.yml
- local: config/.gitlab/phpunit_default.yml
- local: config/.gitlab/check_merge_request.yml
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "bac89117b0c0a0c2364a42d6cff2d044",
"content-hash": "3c30b68e3d0d2a2554093e29f9316286",
"packages": [
{
"name": "asm89/stack-cors",
......@@ -10811,6 +10811,58 @@
],
"time": "2021-02-05T01:40:26+00:00"
},
{
"name": "micheh/phpcs-gitlab",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/micheh/phpcs-gitlab.git",
"reference": "fd64e6579d9e30a82abba616fabcb9a2c837c7a8"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/micheh/phpcs-gitlab/zipball/fd64e6579d9e30a82abba616fabcb9a2c837c7a8",
"reference": "fd64e6579d9e30a82abba616fabcb9a2c837c7a8",
"shasum": ""
},
"require": {
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"squizlabs/php_codesniffer": "^3.3.1",
"vimeo/psalm": "^4.3"
},
"type": "library",
"autoload": {
"psr-4": {
"Micheh\\PhpCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Michel Hunziker",
"email": "info@michelhunziker.com"
}
],
"description": "Gitlab Report for PHP_CodeSniffer (display the violations in the Gitlab CI/CD Code Quality Report)",
"keywords": [
"PHP_CodeSniffer",
"code quality",
"gitlab",
"phpcs",
"report"
],
"support": {
"issues": "https://github.com/micheh/phpcs-gitlab/issues",
"source": "https://github.com/micheh/phpcs-gitlab/tree/1.1.0"
},
"time": "2020-12-20T09:39:07+00:00"
},
{
"name": "mikey179/vfsstream",
"version": "v1.6.8",
......
......@@ -20,5 +20,3 @@
- web/
- .env
- docker-compose.yml
rules:
- if: $CI_COMMIT_BRANCH == "develop" || $CI_COMMIT_BRANCH == "contrib_modules"
.check_merge_request:
image: libert/drupal-php-dev:7.4
needs: ['Build Drupal']
tags:
- spud
rules:
- if: $CI_COMMIT_BRANCH == "contrib_modules"
PHPCS:
stage: Code quality PHP 7.4
extends: .code_quality_default
script:
- phpcs --standard=./scripts/quality/phpcs.xml.dist --report-\\Micheh\\PhpCodeSniffer\\Report\\Gitlab=phpcs-quality-report.json web/modules/contrib_project/
artifacts:
paths: [phpcs-quality-report.json]
PHPStan:
stage: Code quality PHP 7.4
extends: .code_quality_default
script:
- ./vendor/bin/phpstan
analyse
-c ./scripts/quality/phpstan.neon.dist
--error-format=gitlab
--no-progress
--memory-limit=-1
web/modules/contrib_project/ > phpstan.json
artifacts:
paths: [phpstan.json]
workflow:
rules:
# Execute jobs in merge request context.
- if: $CI_MERGE_REQUEST_ID
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment