2015-11-21 07:44:04 +01:00
|
|
|
language: php
|
|
|
|
|
2018-04-20 06:18:27 +02:00
|
|
|
dist: trusty
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.composer/cache/files
|
2015-11-21 07:44:04 +01:00
|
|
|
|
|
|
|
env:
|
2018-04-20 06:18:27 +02:00
|
|
|
global:
|
|
|
|
- COMPOSER_ROOT_VERSION=4.0.x-dev
|
2015-11-21 07:44:04 +01:00
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- php: 5.6
|
2018-04-20 06:18:27 +02:00
|
|
|
env: DB=MYSQL INSTALLER_VERSION=4.0.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1
|
2015-11-21 07:44:04 +01:00
|
|
|
- php: 7.0
|
2018-04-20 06:18:27 +02:00
|
|
|
env: DB=PGSQL INSTALLER_VERSION=4.1.x-dev PHPUNIT_TEST=1
|
|
|
|
- php: 7.1
|
|
|
|
env: DB=MYSQL INSTALLER_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1
|
|
|
|
- php: 7.2
|
|
|
|
env: DB=MYSQL INSTALLER_VERSION=4.x-dev PHPUNIT_TEST=1
|
2015-11-21 07:44:04 +01:00
|
|
|
|
|
|
|
before_script:
|
2018-04-20 06:18:27 +02:00
|
|
|
# Init PHP
|
|
|
|
- phpenv rehash
|
|
|
|
- phpenv config-rm xdebug.ini
|
|
|
|
|
|
|
|
# Install composer dependencies
|
|
|
|
- composer validate
|
|
|
|
- echo $INSTALLER_VERSION
|
|
|
|
- composer require --prefer-source --no-update silverstripe/recipe-cms:1.1.x-dev
|
|
|
|
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.0.x-dev; fi
|
|
|
|
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
|
|
|
|
- vendor/bin/sake flush=all
|
|
|
|
|
|
|
|
- php vendor/silverstripe/framework/tests/dump_constants.php
|
2015-11-21 07:44:04 +01:00
|
|
|
|
|
|
|
script:
|
2018-04-20 06:18:27 +02:00
|
|
|
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml tests/; fi
|
|
|
|
|
|
|
|
after_success:
|
|
|
|
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
|