From 2bb61dcfcced97a32eff208ae80f5d5bf7584840 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Thu, 26 Jan 2017 22:42:05 +1300 Subject: [PATCH] TEST Move coverage run to PHP 7.1 (for speed). Remove ocular in favour of codecov. Add default phpunit.xml with coverage whitelist. --- .travis.yml | 12 ++++-------- phpunit.xml.dist | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 8 deletions(-) create mode 100644 phpunit.xml.dist diff --git a/.travis.yml b/.travis.yml index ab21202..fe69f58 100755 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ matrix: env: DB=MYSQL CORE_RELEASE=4 - php: 5.6 - env: DB=MYSQL CORE_RELEASE=4 COVERAGE=1 + env: DB=MYSQL CORE_RELEASE=4 - php: 5.6 env: DB=PGSQL CORE_RELEASE=4 - php: 5.6 @@ -34,11 +34,7 @@ matrix: env: DB=MYSQL CORE_RELEASE=4 - php: 7.1 - env: DB=MYSQL CORE_RELEASE=4 - - php: 7.1 - env: DB=PGSQL CORE_RELEASE=4 - - php: 7.1 - env: DB=SQLITE CORE_RELEASE=4 + env: DB=MYSQL CORE_RELEASE=4 COVERAGE=1 before_script: @@ -47,6 +43,7 @@ before_script: - git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support - php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require "silverstripe/comments" --require "silverstripe/widgets" - cd ~/builds/ss + - mv "$MODULE_PATH/phpunit.xml.dist" . #Execute tests with or without coverage script: @@ -60,5 +57,4 @@ script: 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 [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov; fi" diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..f7339cb --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,18 @@ + + + blog/tests + + + + + + + + + blog/src/ + + blog/tests/ + + + +