-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
.gitlab-ci.yml
24 lines (20 loc) · 924 Bytes
/
.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
php-7.0-linting:
image: php:7.0
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'
php-7.1-linting:
image: php:7.1
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'
php-7.2-linting:
image: php:7.2
script:
- sh -c 'if find . -name "*.php" -exec php -l {} 2>&1 \; | grep -v "^No syntax errors detected"; then exit 1; fi'
php-7.2-phpcs:
image: php:7.2
script:
- curl -sOL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar && mv phpcs.phar /usr/local/bin/phpcs && chmod 755 /usr/local/bin/phpcs
- phpcs --colors --standard=PSR2 --report=full .
- curl -sOL https://getcomposer.org/download/1.8.0/composer.phar && mv composer.phar /usr/local/bin/composer && chmod 755 /usr/local/bin/composer
- composer validate
allow_failure: true