Skip to content

Commit

Permalink
Remove MW 1.19 and 1.20 tests as they encounter a MW PHP notice
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDeDauw committed Mar 27, 2014
1 parent 58eaf2e commit 10651ca
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
17 changes: 3 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,18 @@ env:
matrix:
include:
- env: DBTYPE=mysql; MW=master
php: 5.3
- env: DBTYPE=mysql; MW=1.19.0
php: 5.4
- env: DBTYPE=mysql; MW=1.21.0
php: 5.3
- env: DBTYPE=sqlite; MW=1.22.0
php: 5.5
- env: DBTYPE=sqlite; MW=master; TYPE=coverage
php: 5.6
- env: DBTYPE=sqlite; MW=1.19.0
php: 5.5
- env: DBTYPE=mysql; MW=master
php: hhvm
exclude:
- env: THENEEDFORTHIS=FAIL

before_script: bash ./build/travis/before_script.sh

script: bash ./build/travis/script.sh

after_success: bash ./build/travis/after_success.sh

notifications:
irc:
channels:
- "chat.freenode.net#semantic-mediawiki"
on_success: never
on_failure: always
after_success: bash ./build/travis/after_success.sh
3 changes: 3 additions & 0 deletions build/travis/after_success.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@ originalDirectory=$(pwd)
if [ "$TYPE" == "coverage" ]
then
wget https://scrutinizer-ci.com/ocular.phar
du -hs $originalDirectory/build/coverage.clover
ls -lap $originalDirectory
ls -lap $originalDirectory/build
php ocular.phar code-coverage:upload --format=php-clover $originalDirectory/build/coverage.clover
fi
8 changes: 5 additions & 3 deletions build/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

set -x

cd ../phase3/extensions/Maps
originalDirectory=$(pwd)

cd ../phase3/tests/phpunit

if [ "$TYPE" == "coverage" ]
then
phpunit --coverage-clover ../../extensions/Maps/build/coverage.clover
php phpunit.php --group Maps -c ../../extensions/Maps/phpunit.xml.dist --coverage-clover $originalDirectory/build/coverage.clover
else
phpunit
php phpunit.php --group Maps -c ../../extensions/Maps/phpunit.xml.dist
fi
14 changes: 10 additions & 4 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,16 @@
passthru( 'composer update' );
chdir( $pwd );

require_once( __DIR__ . '/evilMediaWikiBootstrap.php' );
$shouldUseMwHack = !defined( 'MEDIAWIKI' );

if ( $shouldUseMwHack ) {
require_once( __DIR__ . '/evilMediaWikiBootstrap.php' );
}

require_once( __DIR__ . '/../vendor/autoload.php' );

foreach ( $GLOBALS['wgExtensionFunctions'] as $extensionFunction ) {
call_user_func( $extensionFunction );
}
if ( $shouldUseMwHack ) {
foreach ( $GLOBALS['wgExtensionFunctions'] as $extensionFunction ) {
call_user_func( $extensionFunction );
}
}

0 comments on commit 10651ca

Please sign in to comment.