-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
103 lines (96 loc) · 4.41 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
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
sudo: false
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
fast_finish: true
#allow_failures:
# - php: 5.6
exclude:
# Newer Magento versions uses newer PHP versions
- php: 5.3
env: MAGENTO_VERSION="magento-mirror-1.9.3.2"
# Old Magento Versions are not officially supported to run with PHP 5.5
- php: 5.5
env: MAGENTO_VERSION="magento-mirror-1.6.2.0"
- php: 5.5
env: MAGENTO_VERSION="magento-mirror-1.7.0.2"
# Old Magento Versions are not officially supported to run with PHP 5.6
- php: 5.6
env: MAGENTO_VERSION="magento-mirror-1.6.2.0"
- php: 5.6
env: MAGENTO_VERSION="magento-mirror-1.7.0.2"
- php: 5.6
env: MAGENTO_VERSION="magento-mirror-1.8.1.0"
- php: 5.6
env: MAGENTO_VERSION="magento-mirror-1.9.0.1"
# Old Magento Versions are not officially supported to run with PHP 7.0
- php: 7.0
env: MAGENTO_VERSION="magento-mirror-1.6.2.0"
- php: 7.0
env: MAGENTO_VERSION="magento-mirror-1.7.0.2"
- php: 7.0
env: MAGENTO_VERSION="magento-mirror-1.8.1.0"
- php: 7.0
env: MAGENTO_VERSION="magento-mirror-1.9.0.1"
env:
global:
- MAGENTO_DB_ALLOWSAME=1
- SKIP_CLEANUP=1
- TEST_BASEDIR=.modman/oyst-magento/app/code/community/Oyst/Oyst/Test
matrix:
- MAGENTO_VERSION="magento-mirror-1.6.2.0"
- MAGENTO_VERSION="magento-mirror-1.7.0.2"
- MAGENTO_VERSION="magento-mirror-1.8.1.0"
- MAGENTO_VERSION="magento-mirror-1.9.3.1"
cache:
apt: true
directories:
- $HOME/.composer/cache
- $HOME/.cache/bin
install:
- composer install --no-interaction
- phpenv rehash
script:
- mkdir -p build/logs
- curl --retry 2 --retry-delay 5 -f -sSL https://raw.githubusercontent.com/AOEpeople/MageTestStand/master/setup.sh | bash
## PHP CodeSniffer disable error on exit
- ./bin/phpcs --config-set ignore_warnings_on_exit 1
## PHP CodeSniffer with ECG Magento Code Sniffer Coding Standard
- rm -Rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Ecg &&
cp -R vendor/magento-ecg/coding-standard/Ecg vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Ecg &&
./bin/phpcs --standard=Ecg --extensions=php,phtml --ignore=bin,lib,vendor $TRAVIS_BUILD_DIR
## PHP Copy/Paste Detector
- ./bin/phpcpd $TRAVIS_BUILD_DIR --exclude bin --exclude lib --exclude vendor
## PHP Mess Detector
- ./bin/phpmd $TRAVIS_BUILD_DIR text cleancode --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
- ./bin/phpmd $TRAVIS_BUILD_DIR text codesize --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
- ./bin/phpmd $TRAVIS_BUILD_DIR text controversial --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
- ./bin/phpmd $TRAVIS_BUILD_DIR text design --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
- ./bin/phpmd $TRAVIS_BUILD_DIR text naming --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
- ./bin/phpmd $TRAVIS_BUILD_DIR text unusedcode --exclude bin --exclude lib --exclude vendor --ignore-violations-on-exit
## PHPLOC
- ./bin/phploc $TRAVIS_BUILD_DIR --exclude bin --exclude lib --exclude vendor
## LINT
- find $TRAVIS_BUILD_DIR/app -type f -name \*.php -exec php -l {} \;
## Magento EQP Coding Standard
- if [[ "${TRAVIS_PHP_VERSION:0:3}" = "5.6" ]]; then
composer config http-basic.repo.magento.com $MAGENTO_REPO_PUBLIC_KEY $MAGENTO_REPO_PRIVATE_KEY &&
composer require -n magento/marketplace-eqp &&
rm -Rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MEQP1 &&
cp -a vendor/magento/marketplace-eqp/MEQP1 vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/MEQP1 &&
cp -a vendor/magento/marketplace-eqp/Utils vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/Utils &&
./bin/phpcs --standard=MEQP1 --extensions=php,phtml --ignore=bin,lib,vendor --severity=10 $TRAVIS_BUILD_DIR;
fi
## PHPCompatibility
- rm -Rf vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility &&
cp -a vendor/wimg/php-compatibility vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility &&
./bin/phpcs --standard=PHPCompatibility --extensions=php,phtml --ignore=bin,lib,vendor --runtime-set testVersion ${TRAVIS_PHP_VERSION:0:3} $TRAVIS_BUILD_DIR
notifications:
email:
on_success: never # options: [always|never|change] default: always
on_failure: never # options: [always|never|change] default: always