From 70917d9155f1aee9fac94987b9764c3930d4facd Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Jun 2014 11:26:27 +0200 Subject: [PATCH 1/5] [ticket/273] Only show portal files in coverage report B3P-273 --- phpunit.xml.dist | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index e2fda74c..ec624f53 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -22,8 +22,11 @@ - - ./tests/ - + + ./ + + ./tests/ + + From 7bb42186e67c70f28547b7680ce99b40d1328837 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Jun 2014 11:29:01 +0200 Subject: [PATCH 2/5] [ticket/273] Add coverage badge to README.md B3P-273 --- README.md | 1 + 1 file changed, 1 insertion(+) 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) From 6d66f85a5c48800017188784ad79a5c41cc6b3c5 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Jun 2014 11:45:16 +0200 Subject: [PATCH 3/5] [ticket/273] Add more excluded directories to filter B3P-273 --- phpunit.xml.dist | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ec624f53..87e2b4ed 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -26,6 +26,11 @@ ./ ./tests/ + ./../../../cache/ + ./../../../includes/ + ./../../../language/ + ./../../../phpbb/ + ./../../../vendor/ From 3728b87360f1dae36c8183501d8ecf896ef00724 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Jun 2014 12:48:36 +0200 Subject: [PATCH 4/5] [ticket/273] Add script for modifying phpunit-mysqli-travis.xml B3P-273 --- .travis.yml | 1 + phpunit.xml.dist | 14 -------------- travis/prepare-coverage.sh | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 14 deletions(-) create mode 100755 travis/prepare-coverage.sh 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/phpunit.xml.dist b/phpunit.xml.dist index 87e2b4ed..acb51ed3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -20,18 +20,4 @@ ./tests/functional/ - - - - ./ - - ./tests/ - ./../../../cache/ - ./../../../includes/ - ./../../../language/ - ./../../../phpbb/ - ./../../../vendor/ - - - diff --git a/travis/prepare-coverage.sh b/travis/prepare-coverage.sh new file mode 100755 index 00000000..929756ed --- /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<\/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 From 70cf2659519fb4f5ecfaa97f3e1edb5b79bd6c5c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 28 Jun 2014 13:10:55 +0200 Subject: [PATCH 5/5] [ticket/273] Exclude develop from coverage reports B3P-273 --- travis/prepare-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/prepare-coverage.sh b/travis/prepare-coverage.sh index 929756ed..912e5a04 100755 --- a/travis/prepare-coverage.sh +++ b/travis/prepare-coverage.sh @@ -16,6 +16,6 @@ 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<\/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 + 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