FIX Fix CI builds, remove excessive Travis builds matrixes, update composer constraint for gridfield-bulk-tools

This commit is contained in:
Robbie Averill 2017-01-26 11:58:17 +13:00
parent 19224d9813
commit 07586d7579
3 changed files with 15 additions and 25 deletions

View File

@ -66,4 +66,4 @@ checks:
argument_type_checks: true
filter:
paths: [code/*, tests/*]
paths: [src/*, tests/*]

View File

@ -1,7 +1,5 @@
language: php
sudo: true
addons:
apt:
packages:
@ -18,43 +16,33 @@ before_install:
env:
global:
- DB=MYSQL CORE_RELEASE=master
- MODULE_PATH=comments
# Set to 1 in the matrix to enable code coverage
- COVERAGE=0
- DB=MYSQL CORE_RELEASE=4
matrix:
include:
- php: 5.6
#CommentsListTest breaks with this env: DB=MYSQL CORE_RELEASE=3.2 COVERAGE=1
env: DB=SQLITE CORE_RELEASE=master COVERAGE=1
- php: 5.6
env: DB=MYSQL CORE_RELEASE=master
- php: 7.0
env: DB=MYSQL CORE_RELEASE=master
- php: 7.1
env: DB=MYSQL CORE_RELEASE=master
env: DB=MYSQL CORE_RELEASE=4 COVERAGE=1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=master
env: DB=PGSQL CORE_RELEASE=4
- php: 5.6
env: DB=SQLITE CORE_RELEASE=4
before_script:
- phpenv rehash
- composer self-update || true
- git clone git://github.com/silverstripe-labs/silverstripe-travis-support.git ~/travis-support
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
# Install suggested modules in order to maximize test coverage
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require "ezyang/htmlpurifier:4.*,silverstripe/cms:^4.0@dev"
- cd ~/builds/ss
script:
# Execute tests with no coverage. This is the fastest option
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi"
- "if [ \"$COVERAGE\" != \"1\" ]; then vendor/bin/phpunit comments/tests/; fi"
# Execute tests with coverage. Do this for a small
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi"
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover comments/tests/; fi"
after_script:
after_success:
- "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 [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov; fi"

View File

@ -9,7 +9,7 @@
}],
"require": {
"silverstripe/framework": "^4.0@dev",
"colymba/gridfield-bulk-editing-tools": "~2.1"
"colymba/gridfield-bulk-editing-tools": "^3.0@dev"
},
"suggest": {
"ezyang/htmlpurifier": "Standards compliant HTML filter written in PHP",
@ -29,5 +29,7 @@
"SilverStripe\\Comments\\Tests\\": "tests/"
}
},
"license": "BSD-3-Clause"
"license": "BSD-3-Clause",
"minimum-stability": "dev",
"prefer-stable": true
}