diff --git a/.travis.yml b/.travis.yml index e353ba19..f66a727e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ install: - sh -c "if [ '$COVERALLS' != '0' ]; then ../board3/Board3-Portal/travis/prepare-coveralls.sh $DB $TRAVIS_PHP_VERSION; fi" - travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH - travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION + - sh -c "if [ '$COVERALLS' != '0' ]; then ../board3/Board3-Portal/travis/prepare-coverage.sh $DB $TRAVIS_PHP_VERSION; fi" before_script: - travis/setup-database.sh $DB $TRAVIS_PHP_VERSION diff --git a/README.md b/README.md index 8dac1ed6..4022b8fb 100644 --- a/README.md +++ b/README.md @@ -18,3 +18,4 @@ The extension is currently under heavy development and not supported until furth We are starting to have unit and functional tests in order to prevent regressions. You can check our travis build below. develop-2.1.x - [![Build Status](https://api.travis-ci.org/board3/Board3-Portal.png?branch=develop-2.1.x)](https://travis-ci.org/board3/Board3-Portal) +[![Coverage Status](https://coveralls.io/repos/board3/Board3-Portal/badge.png?branch=develop-2.1.x)](https://coveralls.io/r/board3/Board3-Portal?branch=develop-2.1.x) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e2fda74c..acb51ed3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -20,10 +20,4 @@ ./tests/functional/ - - - - ./tests/ - - diff --git a/travis/prepare-coverage.sh b/travis/prepare-coverage.sh new file mode 100755 index 00000000..912e5a04 --- /dev/null +++ b/travis/prepare-coverage.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# This file is part of the phpBB Forum Software package. +# +# @copyright (c) phpBB Limited +# @license GNU General Public License, version 2 (GPL-2.0) +# +# For full copyright and license information, please see +# the docs/CREDITS.txt file. +# +set -e +set -x + +DB=$1 +TRAVIS_PHP_VERSION=$2 + +if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ] +then + sed -n '1h;1!H;${;g;s/<\/php>/<\/php>\n\t\n\t\t\n\t\t\t..\/<\/directory>\n\t\t\t\n\t\t\t\t..\/tests\/<\/directory>\n\t\t\t\t..\/develop\/<\/directory>\n\t\t\t<\/exclude>\n\t\t<\/whitelist>\n\t<\/filter>/g;p;}' phpBB/ext/board3/portal/travis/phpunit-mysqli-travis.xml &> phpBB/ext/board3/portal/travis/phpunit-mysqli-travis.xml.bak + cp phpBB/ext/board3/portal/travis/phpunit-mysqli-travis.xml.bak phpBB/ext/board3/portal/travis/phpunit-mysqli-travis.xml +fi