2015-07-20 16:01:39 +01:00
|
|
|
language: php
|
|
|
|
|
2017-11-17 10:58:14 +13:00
|
|
|
dist: trusty
|
2017-07-26 11:55:24 +01:00
|
|
|
|
2017-11-17 10:58:14 +13:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
2014-02-18 17:52:03 +13:00
|
|
|
|
|
|
|
php:
|
2015-11-03 08:43:07 +13:00
|
|
|
- 5.6
|
2014-02-18 17:52:03 +13:00
|
|
|
|
|
|
|
env:
|
2017-05-26 10:23:17 +12:00
|
|
|
global:
|
2017-07-26 14:24:11 +01:00
|
|
|
- DB="PGSQL"
|
2017-11-17 10:58:14 +13:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
|
|
|
- php: 5.6
|
|
|
|
env:
|
|
|
|
- PHPUNIT_TEST=framework
|
|
|
|
- php: 5.6
|
|
|
|
env:
|
|
|
|
- PHPUNIT_TEST=postgresql
|
|
|
|
- PHPCS_TEST=1
|
2014-02-18 17:52:03 +13:00
|
|
|
|
|
|
|
before_script:
|
2017-05-26 10:23:17 +12:00
|
|
|
# Init PHP
|
|
|
|
- phpenv rehash
|
|
|
|
- phpenv config-rm xdebug.ini
|
2017-11-17 10:58:14 +13:00
|
|
|
- export PATH=~/.composer/vendor/bin:$PATH
|
2017-05-26 10:23:17 +12:00
|
|
|
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
|
|
|
|
|
|
|
# Install composer dependencies
|
2017-11-17 10:58:14 +13:00
|
|
|
- composer validate
|
2018-06-29 15:44:18 +12:00
|
|
|
- composer require --no-update silverstripe/recipe-cms:4.3.x-dev
|
2018-07-02 10:58:23 +12:00
|
|
|
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
2017-11-17 10:58:14 +13:00
|
|
|
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
|
2014-02-18 17:52:03 +13:00
|
|
|
|
2016-07-04 15:11:06 +12:00
|
|
|
script:
|
2017-11-17 10:58:14 +13:00
|
|
|
- if [[ $PHPUNIT_TEST == postgresql ]]; then vendor/bin/phpunit ./tests; fi
|
|
|
|
- if [[ $PHPUNIT_TEST == framework ]]; then vendor/bin/phpunit ./vendor/silverstripe/framework/tests/php; fi
|
|
|
|
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi
|