-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
70 lines (59 loc) · 2.74 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
image: php:7.1
variables:
PHP_MEMORY_LIMIT: "1024M"
MYSQL_DATABASE: pimcoretest
MYSQL_ROOT_PASSWORD: pimcoretest
PIMCORE_ENVIRONMENT: test
services:
- mysql:8.0.3
cache:
key: "${CI_PROJECT_ID}"
untracked: false
paths:
- "vendor/"
stages:
- analysis
- tests
before_script:
- apt-get update -qq
- apt-get install -qq -y zip unzip curl git >> /dev/null
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php --install-dir=/usr/bin --filename=composer
- php -r "unlink('composer-setup.php');"
psr2:
stage: analysis
script:
- composer global require "divante-ltd/pimcore-coding-standards":"dev-master" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- php -d memory_limit=$PHP_MEMORY_LIMIT /root/.composer/vendor/bin/phpcs --config-set colors 1
- php -d memory_limit=$PHP_MEMORY_LIMIT /root/.composer/vendor/bin/phpcs --extensions=php --standard=/root/.composer/vendor/divante-ltd/pimcore-coding-standards/Standards/Pimcore5/ruleset.xml ./src -s
phpmd:
stage: analysis
script:
- composer global require "phpmd/phpmd":"^2.6.0" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- composer global require "divante-ltd/pimcore-coding-standards":"dev-master" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- /root/.composer/vendor/bin/phpmd src text /root/.composer/vendor/divante-ltd/pimcore-coding-standards/Standards/Pimcore5/rulesetmd.xml
phpcpd:
stage: analysis
script:
- composer global require "sebastian/phpcpd":"^3.0.0" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- /root/.composer/vendor/bin/phpcpd src
phpdocblock:
stage: analysis
script:
- composer global require "block8/php-docblock-checker":"^1.5.0" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- /root/.composer/vendor/bin/phpdoccheck --directory=src
phploc:
stage: analysis
script:
- composer global require "phploc/phploc":"^4.0.0" --no-interaction --prefer-dist --ignore-platform-reqs --quiet
- /root/.composer/vendor/bin/phploc src
phpunit:
stage: tests
script:
- echo "Running PHPUnit Tests"
- apt-get install -y libjpeg62-turbo-dev libmcrypt-dev libbz2-dev zlib1g-dev libpng-dev libicu-dev g++ &> /dev/null
- docker-php-ext-configure intl
- docker-php-ext-install -j$(nproc) zip iconv mcrypt bz2 exif pdo pdo_mysql mysqli gd intl
- COMPOSER_MEMORY_LIMIT=-1 composer install --ignore-platform-reqs
- vendor/bin/pimcore-install --ignore-existing-config --admin-username=admin --admin-password=admin123 --mysql-host-socket=mysql --mysql-username=root --mysql-password=pimcoretest --mysql-database=pimcoretest --env=test --no-interaction
- vendor/bin/phpunit --coverage-text