-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea2aa3a
commit e6c7a1e
Showing
2 changed files
with
39 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,39 @@ | ||
sudo: false | ||
|
||
language: php | ||
sudo: true | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
services: | ||
- mysql | ||
- postgresql | ||
|
||
env: | ||
global: | ||
- DB=MYSQL CORE_RELEASE=3.1 | ||
- MODULE_PATH=systemmessages | ||
- COMPOSER_ROOT_VERSION="4.0.x-dev" | ||
|
||
matrix: | ||
include: | ||
- php: 5.4 | ||
env: DB=SQLITE CORE_RELEASE=3.1 | ||
- php: 5.5 | ||
env: DB=PGSQL CORE_RELEASE=3.1 | ||
- php: 5.5 | ||
env: DB=SQLITE CORE_RELEASE=3.1 | ||
- php: 5.6 | ||
env: DB=SQLITE CORE_RELEASE=3.2 | ||
- php: 5.6 | ||
env: DB=SQLITE CORE_RELEASE=3.4 | ||
- php: 5.6 | ||
env: DB=PGSQL CORE_RELEASE=3.5 | ||
- php: 5.6 | ||
env: DB=PGSQL CORE_RELEASE=3.6 | ||
allow_failures: | ||
- php: 7.0 | ||
- php: 7.1 | ||
env: DB=PGSQL INSTALLER_VERSION=4.2.x-dev PHPUNIT_TEST=1 UNIT_TESTS_RUNNING=1 | ||
- php: 7.1 | ||
env: DB=MYSQL INSTALLER_VERSION=4.2.x-dev PHPUNIT_COVERAGE_TEST=1 UNIT_TESTS_RUNNING=1 | ||
- php: 7.2 | ||
env: DB=MYSQL INSTALLER_VERSION=4.x-dev PHPCS_TEST=1 PHPUNIT_TEST=1 UNIT_TESTS_RUNNING=1 | ||
|
||
before_script: | ||
- composer self-update | ||
- export PATH=~/.config/composer/vendor/bin:~/.composer/vendor/bin:$PATH | ||
|
||
# Init PHP | ||
- phpenv rehash | ||
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support | ||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require "ezyang/htmlpurifier:4.*,silverstripe/cms:~3.1" | ||
- cd ~/builds/ss | ||
- phpenv config-rm xdebug.ini | ||
- echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | ||
|
||
# Install composer dependencies | ||
- composer validate | ||
- composer require --no-update silverstripe/installer:$INSTALLER_VERSION | ||
- if [[ $DB == PGSQL ]]; then composer require --no-update silverstripe/postgresql:2.x-dev; fi | ||
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile | ||
|
||
script: | ||
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi" | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi" | ||
|
||
after_script: | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi" | ||
- cd ~/build/$TRAVIS_REPO_SLUG | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi" | ||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi | ||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi | ||
- if [[ $PHPCS_TEST ]]; then composer run-script lint; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters