Rss-Bridge/.travis.yml
logmanoriginal e671a2ad02 [.travis.yml] Fix configuration to work with Ubuntu Trusty
Travis CI upgraded the linux build environment from Ubuntu Precise
to Ubuntu Trusty with Trusty becoming the default build environment
as of August 2017:

  https://docs.travis-ci.com/user/reference/overview/

A bug in the configuration of the Ubuntu Trusty distro causes all
builds except nightly to fail. The PHP include_path is set to

  include_path='.:/home/travis/.phpenv/versions/5.6.31/share/pear'

instead of

  include_path='.:/home/travis/.phpenv/versions/5.6.31/lib/php/pear'

which causes phpcs to fail because it cannot resolve import paths.

This commit adds a hotfix to .travis.yml that circumvents the
issue by overwriting the include_path during initialization. This
hotfix should be removed once a solution is found.

This bug is tracked via
https://github.com/travis-ci/travis-ci/issues/8487
2017-09-23 20:48:28 +02:00

35 lines
No EOL
1,004 B
YAML

dist: trusty
language: php
php:
- '5.6'
- '7.0'
- hhvm
- nightly
before_install:
# Circumvent a bug in current Travis CI builds using Ubuntu Trusty, where the
# include_path is wrong.
#
# Default is:
# - include_path='.:/home/travis/.phpenv/versions/5.6.31/share/pear'
#
# Should be:
# - include_path='.:/home/travis/.phpenv/versions/5.6.31/lib/php/pear'
#
# This applies to all builds except hhvm and nightly. Once the distro is fixed
# the following line can be removed
- if [[ ${TRAVIS_PHP_VERSION:0:1} == "5" || ${TRAVIS_PHP_VERSION:0:1} == "7" ]]; then echo "include_path='.:/home/travis/.phpenv/versions/$(phpenv version-name)/lib/php/pear'" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
install:
- pear channel-update pear.php.net
- pear install PHP_CodeSniffer
script:
- phpenv rehash
- phpcs . --standard=phpcs.xml --warning-severity=0 --extensions=php -p
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly