From 564936ee01fc66b47cae681196acb79a4fecadca Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 3 May 2018 10:37:28 +1200 Subject: [PATCH 1/3] Remove PHP 5.3 from Travis build matrix --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8e741aa..a066e8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ sudo: false language: php php: - - 5.3 - 5.4 - 5.5 - 5.6 From e5651c429cb4485d51dc9548ab734b1b7d030e61 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 3 May 2018 10:52:36 +1200 Subject: [PATCH 2/3] Update Travis matrix, Scrutinizer config and readme badges. Use codecov.io. --- .scrutinizer.yml | 4 ---- .travis.yml | 30 ++++++++++++++---------------- readme.md | 10 +++++----- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 0c32759..61b0c9f 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -1,9 +1,5 @@ inherit: true -tools: - external_code_coverage: - timeout: 1800 # 30 minute delay to allow for coverage reporting taking ages! - checks: php: code_rating: true diff --git a/.travis.yml b/.travis.yml index 9e83a65..a55bb81 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,22 @@ language: php php: - - 5.3 - 5.4 - 5.5 - - 5.6 - - 7.0 sudo: false env: - - DB=MYSQL CORE_RELEASE=3.1 + - DB=MYSQL CORE_RELEASE=3.5 + +matrix: + include: + - php: 5.6 + env: DB=MYSQL CORE_RELEASE=3 + - php: 7.0 + env: DB=MYSQL CORE_RELEASE=3.6 + - php: 7.1 + env: DB=PGSQL CORE_RELEASE=3.6 COVERAGE=1 before_script: - composer self-update || true @@ -20,16 +26,8 @@ before_script: - composer install script: - - vendor/bin/phpunit --coverage-clover coverage.clover environmentcheck/tests - - wget https://scrutinizer-ci.com/ocular.phar - - git remote rm origin - - git remote add origin git@github.com:silverstripe-labs/silverstripe-environmentcheck.git - - php ocular.phar code-coverage:upload --format=php-clover coverage.clover + - if [[ $COVERAGE ]]; then vendor/bin/phpunit --coverage-clover coverage.xml environmentcheck/tests; fi + - if [[ ! $COVERAGE ]]; then vendor/bin/phpunit environmentcheck/tests; fi -branches: - only: - - master - -matrix: - allow_failures: - - php: 7.0 +after_success: + - if [[ $COVERAGE ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi diff --git a/readme.md b/readme.md index af1b8e6..bb8a88f 100644 --- a/readme.md +++ b/readme.md @@ -1,10 +1,10 @@ # SilverStripe Environment Checker Module -[![Build Status](http://img.shields.io/travis/silverstripe-labs/silverstripe-environmentalcheck.svg?style=flat-square)](https://travis-ci.org/silverstripe-labs/silverstripe-environmentalcheck) -[![Code Quality](http://img.shields.io/scrutinizer/g/silverstripe-labs/silverstripe-environmentalcheck.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-environmentalcheck) -[![Code Coverage](http://img.shields.io/scrutinizer/coverage/g/silverstripe-labs/silverstripe-environmentalcheck.svg?style=flat-square)](https://scrutinizer-ci.com/g/silverstripe-labs/silverstripe-environmentalcheck) -[![Version](http://img.shields.io/packagist/v/silverstripe/environmentalcheck.svg?style=flat-square)](https://packagist.org/packages/silverstripe/silverstripe-environmentalcheck) -[![License](http://img.shields.io/packagist/l/silverstripe/environmentalcheck.svg?style=flat-square)](LICENSE.md) +[![Build Status](https://travis-ci.org/silverstripe/silverstripe-environmentcheck.svg?branch=master)](https://travis-ci.org/silverstripe/silverstripe-environmentcheck) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/silverstripe/silverstripe-environmentcheck/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/silverstripe/silverstripe-environmentcheck/?branch=master) +[![codecov](https://codecov.io/gh/silverstripe/comment-notifications/branch/master/graph/badge.svg)](https://codecov.io/gh/silverstripe/comment-notifications) +[![Packagist](https://img.shields.io/packagist/v/silverstripe/environmentcheck.svg)](https://packagist.org/packages/silverstripe/environmentalcheck) +[![License](http://img.shields.io/packagist/l/silverstripe/environmentcheck.svg)](LICENSE.md) This module adds an API for running environment checks to your API. From 250c8d2e00c8a11cf9dd655ce5febdff101023be Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 3 May 2018 10:57:34 +1200 Subject: [PATCH 3/3] Use test database in database check test --- tests/checks/DatabaseCheckTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/checks/DatabaseCheckTest.php b/tests/checks/DatabaseCheckTest.php index e1b9a1a..7b7a2b8 100644 --- a/tests/checks/DatabaseCheckTest.php +++ b/tests/checks/DatabaseCheckTest.php @@ -4,6 +4,8 @@ * @mixin PHPUnit_Framework_TestCase */ class DatabaseCheckTest extends SapphireTest { + protected $usesDatabase = true; + public function testCheckReportsValidConnection() { $check = new DatabaseCheck();