-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
executable file
·43 lines (37 loc) · 2.14 KB
/
.travis.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
language: php
sudo: false
php:
##- 5.6
- 7.0
before_install:
- test -n "$GITHUB_TOKEN" && echo "Found GitHub token" && composer config github-oauth.github.com "$GITHUB_TOKEN" || echo "No GitHub token found"
- composer config http-basic.repo.magento.com $MAGENTO_REPO_PUBLIC_KEY $MAGENTO_REPO_PRIVATE_KEY &&
composer config repositories.magento-eqp git https://github.com/magento/marketplace-eqp &&
composer require "magento/marketplace-eqp:dev-master"
install:
- composer install --prefer-dist
script:
## PHP CodeSniffer disable error on exit
- vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
## PHP Copy/Paste Detector
##- vendor/bin/phpcpd --exclude vendor $TRAVIS_BUILD_DIR
## PHP Mess Detector
- vendor/bin/phpmd $TRAVIS_BUILD_DIR text cleancode,codesize,controversial,design,naming,unusedcode --exclude vendor --ignore-violations-on-exit
## PHPLOC
- vendor/bin/phploc $TRAVIS_BUILD_DIR --exclude vendor
## LINT
- '! find $TRAVIS_BUILD_DIR -type d \( ! -name vendor \) -type f -name \*.php -exec php -l {} \; 2>&1 >&- | grep "^"'
## Magento EQP Code Sniffer Coding Standard
- cp -a vendor/magento/marketplace-eqp/MEQP vendor/squizlabs/php_codesniffer/src/Standards/ &&
cp -a vendor/magento/marketplace-eqp/MEQP1 vendor/squizlabs/php_codesniffer/src/Standards/ &&
cp -a vendor/magento/marketplace-eqp/MEQP2 vendor/squizlabs/php_codesniffer/src/Standards/ &&
vendor/bin/phpcs --standard=MEQP2 --extensions=php,phtml --ignore=vendor --severity=10 $TRAVIS_BUILD_DIR
## Magento ECG Code Sniffer Coding Standard
- vendor/bin/phpcs --config-set installed_paths vendor/magento-ecg/coding-standard/EcgM2;
- vendor/bin/phpcs --standard=EcgM2 --extensions=php,phtml --ignore=lib,vendor $TRAVIS_BUILD_DIR
## PHPCompatibility
- vendor/bin/phpcs --config-set installed_paths vendor/wimg/php-compatibility && vendor/bin/phpcs --standard=PHPCompatibility --extensions=php,phtml --ignore=vendor --runtime-set testVersion $TRAVIS_PHP_VERSION $TRAVIS_BUILD_DIR
notifications:
email:
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always