2013-12-13 11:39:03 +01:00
|
|
|
language: php
|
2014-03-15 09:45:57 -04:00
|
|
|
|
2017-09-09 01:25:33 +02:00
|
|
|
dist: precise
|
|
|
|
|
|
2013-12-13 11:39:03 +01:00
|
|
|
php:
|
2014-05-06 17:13:16 +07:00
|
|
|
- 5.3
|
|
|
|
|
- 5.4
|
|
|
|
|
- 5.5
|
|
|
|
|
- 5.6
|
2016-01-23 19:25:59 +04:00
|
|
|
- 7.0
|
2017-11-04 22:44:12 +01:00
|
|
|
- 7.1
|
2017-12-29 02:30:53 +01:00
|
|
|
- 7.2
|
2014-03-15 09:45:57 -04:00
|
|
|
|
2014-01-28 08:03:36 +01:00
|
|
|
matrix:
|
2017-11-04 22:44:12 +01:00
|
|
|
include:
|
|
|
|
|
- php: 5.6
|
|
|
|
|
env: COVERAGE=1
|
|
|
|
|
|
|
|
|
|
cache:
|
|
|
|
|
directories:
|
|
|
|
|
- $HOME/.composer/cache
|
|
|
|
|
- .php-cs.cache
|
2014-03-23 17:37:26 +07:00
|
|
|
|
2014-05-04 12:22:55 +02:00
|
|
|
env:
|
2014-05-06 17:13:16 +07:00
|
|
|
global:
|
|
|
|
|
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
|
2014-05-04 12:22:55 +02:00
|
|
|
|
2015-06-23 21:23:51 +04:00
|
|
|
before_install:
|
2014-05-06 17:13:16 +07:00
|
|
|
## Packages
|
2015-06-23 21:34:31 +04:00
|
|
|
- sudo apt-get update -qq
|
|
|
|
|
- sudo apt-get install -y graphviz
|
2015-06-23 21:23:51 +04:00
|
|
|
|
|
|
|
|
before_script:
|
2017-11-04 22:44:12 +01:00
|
|
|
## Deactivate xdebug if we don't do code coverage
|
|
|
|
|
- if [ -z "$COVERAGE" ]; then phpenv config-rm xdebug.ini ; fi
|
2014-05-06 17:13:16 +07:00
|
|
|
## Composer
|
|
|
|
|
- composer self-update
|
2018-03-06 06:34:55 +01:00
|
|
|
- travis_wait composer install --prefer-source
|
2014-05-06 17:13:16 +07:00
|
|
|
## PHPDocumentor
|
|
|
|
|
- mkdir -p build/docs
|
|
|
|
|
- mkdir -p build/coverage
|
2013-12-13 11:39:03 +01:00
|
|
|
|
|
|
|
|
script:
|
2014-05-06 17:13:16 +07:00
|
|
|
## PHP_CodeSniffer
|
2017-11-04 22:44:12 +01:00
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip ; fi
|
|
|
|
|
## PHP-CS-Fixer
|
|
|
|
|
- if [ -n "$COVERAGE" ]; then ./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run ; fi
|
2014-05-06 17:13:16 +07:00
|
|
|
## PHP Mess Detector
|
2017-11-04 22:44:12 +01:00
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php ; fi
|
2014-05-06 17:13:16 +07:00
|
|
|
## PHPUnit
|
2017-11-04 22:44:12 +01:00
|
|
|
- ./vendor/bin/phpunit -c ./ $(if [ -n "$COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi)
|
2014-06-22 09:27:10 +07:00
|
|
|
## PHPLOC
|
2017-11-04 22:44:12 +01:00
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phploc src/ ; fi
|
2014-05-06 17:13:16 +07:00
|
|
|
## PHPDocumentor
|
2017-11-04 22:44:12 +01:00
|
|
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
|
2014-05-04 12:22:55 +02:00
|
|
|
|
2018-05-19 12:39:30 +02:00
|
|
|
after_success:
|
|
|
|
|
## Coveralls
|
|
|
|
|
- if [ -z "$COVERAGE" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi
|