0
0
typo3-linting-code-analyse-.../.gitlab-ci.yml

83 lines
2.0 KiB
YAML

# yamllint disable rule:line-length
stages:
- lint
- check
sass-lint:
image: "node:12.14"
stage: lint
only:
changes:
- packages/**/*.scss
before_script:
- npm install
script:
- ./node_modules/.bin/gulp sassLint
typoscript-lint:
image: "php:7.2"
stage: lint
only:
changes:
- packages/**/*.typoscript
before_script:
- apt -y update > /dev/null
- apt -y install zip > /dev/null
- curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
script:
- rm ./composer.json && rm ./composer.lock
- composer require --dev helmich/typo3-typoscript-lint
- ./vendor/bin/typoscript-lint --fail-on-warnings
yamllint:
image: "python:2.7"
stage: lint
only:
changes:
- packages/**/*.yaml
before_script:
- pip install yamllint
script:
- yamllint -d relaxed .
php-codesniffer:
image: "php:7.2"
stage: lint
only:
changes:
- packages/**/*.php
script:
- rm ./composer.json && rm ./composer.lock
- composer require --dev squizlabs/php_codesniffer
- ./vendor/bin/phpcs -n --extensions=php --standard=PSR2 ./packages/
phpmd:
image: "php:7.2"
stage: check
only:
changes:
- packages/**/*.php
before_script:
- apt -y update > /dev/null
- apt -y install zip > /dev/null
- curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
script:
- rm ./composer.json && rm ./composer.lock
- composer require --dev phpmd/phpmd
- ./vendor/bin/phpmd ./packages/ text ./phpmd.xml
phpstan:
image: "php:7.2"
stage: check
only:
changes:
- packages/**/*.php
before_script:
- apt -y update > /dev/null
- apt -y install git zip > /dev/null
- echo "memory_limit=512M" > /usr/local/etc/php/conf.d/memory-limit.ini
- curl -sS https://getcomposer.org/installer | php && mv ./composer.phar /usr/local/bin/composer
script:
- composer install
- ./vendor/bin/phpstan analyze ./packages/