From 07586d757960013b6737c35420b27fb4b6a3d668 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 26 Jan 2017 11:58:17 +1300 Subject: [PATCH] FIX Fix CI builds, remove excessive Travis builds matrixes, update composer constraint for gridfield-bulk-tools --- .scrutinizer.yml | 2 +- .travis.yml | 32 ++++++++++---------------------- composer.json | 6 ++++-- 3 files changed, 15 insertions(+), 25 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index d1ebd80..af8f18e 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -66,4 +66,4 @@ checks: argument_type_checks: true filter: - paths: [code/*, tests/*] + paths: [src/*, tests/*] diff --git a/.travis.yml b/.travis.yml index 3aeb37e..0f30f48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/composer.json b/composer.json index 4afc8b5..e4be2fd 100644 --- a/composer.json +++ b/composer.json @@ -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 }