Skip to content

Commit

Permalink
Add missing TravisCI file and improve PHPUnit bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
JeroenDeDauw committed Dec 19, 2013
1 parent 14b4524 commit 8fa66a8
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*~
*.kate-swp

composer.phar
composer.lock

!.*
.idea/

vendor/
build/
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: php

env:
- THENEEDFORTHIS=FAIL

matrix:
include:
- env: DBTYPE=mysql; MW=master
php: 5.3
- env: DBTYPE=sqlite; MW=master
php: 5.5
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#wikidata"
on_success: never
on_failure: always
11 changes: 9 additions & 2 deletions php/tests/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<?php

echo exec( 'composer update' ) . "\n";
if ( php_sapi_name() !== 'cli' ) {
die( 'Not an entry point' );
}

require_once( __DIR__ . '/../vendor/autoload.php' );
$pwd = exec( 'pwd' );
chdir( __DIR__ . '/../..' );
passthru( 'composer update' );
chdir( $pwd );

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

0 comments on commit 8fa66a8

Please sign in to comment.