2015-07-20 17:01:39 +02:00
|
|
|
language: php
|
|
|
|
|
2019-09-26 00:25:41 +02:00
|
|
|
dist: xenial
|
|
|
|
|
|
|
|
services:
|
|
|
|
- postgresql
|
|
|
|
-
|
2017-07-26 12:55:24 +02:00
|
|
|
|
2017-11-16 22:58:14 +01:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
2014-02-18 05:52:03 +01:00
|
|
|
|
|
|
|
env:
|
2017-05-26 00:23:17 +02:00
|
|
|
global:
|
2017-07-26 15:24:11 +02:00
|
|
|
- DB="PGSQL"
|
2017-11-16 22:58:14 +01:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2018-01-18 04:31:14 +01:00
|
|
|
- php: 7.2
|
2017-11-16 22:58:14 +01:00
|
|
|
env:
|
|
|
|
- PHPUNIT_TEST=postgresql
|
|
|
|
- PHPCS_TEST=1
|
2014-02-18 05:52:03 +01:00
|
|
|
|
|
|
|
before_script:
|
2017-05-26 00:23:17 +02:00
|
|
|
# Init PHP
|
|
|
|
- phpenv rehash
|
|
|
|
- phpenv config-rm xdebug.ini
|
2017-11-16 22:58:14 +01:00
|
|
|
- export PATH=~/.composer/vendor/bin:$PATH
|
2017-05-26 00:23:17 +02:00
|
|
|
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
|
|
|
|
|
|
|
|
# Install composer dependencies
|
2017-11-16 22:58:14 +01:00
|
|
|
- composer validate
|
2018-06-29 05:29:18 +02:00
|
|
|
- composer require --no-update silverstripe/recipe-cms:5.x-dev
|
2018-01-23 02:32:45 +01:00
|
|
|
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
2017-11-16 22:58:14 +01: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 05:52:03 +01:00
|
|
|
|
2016-07-04 05:11:06 +02:00
|
|
|
script:
|
2017-11-16 22:58:14 +01: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
|