2017-06-23 06:01:58 +02:00
|
|
|
# See https://github.com/silverstripe/silverstripe-travis-support for setup details
|
2013-03-29 10:19:52 +01:00
|
|
|
|
2015-07-20 17:05:32 +02:00
|
|
|
sudo: false
|
|
|
|
|
2015-12-15 23:06:57 +01:00
|
|
|
language: php
|
|
|
|
|
2017-06-21 06:30:14 +02:00
|
|
|
env:
|
|
|
|
global:
|
2017-07-03 23:18:21 +02:00
|
|
|
- COMPOSER_ROOT_VERSION=4.0.x-dev
|
2017-06-21 06:30:14 +02:00
|
|
|
- CORE_RELEASE=master
|
|
|
|
|
2013-03-29 10:19:52 +01:00
|
|
|
matrix:
|
2017-04-13 03:52:16 +02:00
|
|
|
fast_finish: true
|
2013-03-29 10:19:52 +01:00
|
|
|
include:
|
2015-12-15 23:06:57 +01:00
|
|
|
- php: 5.6
|
2017-04-13 03:52:16 +02:00
|
|
|
env: DB=MYSQL PHPUNIT_TEST=1 PHPCS_TEST=1
|
2015-12-15 23:06:57 +01:00
|
|
|
- php: 7.0
|
2017-04-13 03:52:16 +02:00
|
|
|
env: DB=MYSQL PHPUNIT_TEST=1
|
2017-07-16 06:42:16 +02:00
|
|
|
- php: 7.1
|
2017-04-13 03:52:16 +02:00
|
|
|
env: DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1
|
2013-03-29 10:19:52 +01:00
|
|
|
|
|
|
|
before_script:
|
2017-06-21 06:30:14 +02:00
|
|
|
- composer validate
|
2015-12-15 23:06:57 +01:00
|
|
|
- composer self-update || true
|
2017-04-13 03:52:16 +02:00
|
|
|
- "if [ \"$PHPCS_TEST\" = \"1\" ]; then pyrus install pear/PHP_CodeSniffer; fi"
|
|
|
|
- phpenv rehash
|
|
|
|
- phpenv config-rm xdebug.ini
|
|
|
|
- composer validate
|
|
|
|
- composer install --prefer-dist
|
|
|
|
- composer require --no-update --prefer-dist silverstripe/admin:1.0.x-dev silverstripe/framework:4.0.x-dev silverstripe/versioned:1.0.x-dev silverstripe/config:1.0.x-dev silverstripe/assets:1.0.x-dev --prefer-dist
|
|
|
|
- composer update
|
2013-03-29 10:19:52 +01:00
|
|
|
|
2015-12-15 23:06:57 +01:00
|
|
|
script:
|
2017-04-13 03:52:16 +02:00
|
|
|
- "if [ \"$PHPUNIT_TEST\" = \"1\" ]; then vendor/bin/phpunit; fi"
|
|
|
|
- "if [ \"$PHPCS_TEST\" = \"1\" ]; then composer run-script lint; fi"
|
2017-07-16 06:42:16 +02:00
|
|
|
- "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi"
|
2017-04-13 03:52:16 +02:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi"
|