mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-05 19:37:17 +00:00
Implemented basic Travis-CI test
This commit is contained in:
parent
84e62598ce
commit
92b0b4d43c
14
.travis.yml
14
.travis.yml
@ -1,22 +1,20 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.4
|
||||
- 5.5
|
||||
- 5.6
|
||||
|
||||
branches:
|
||||
except:
|
||||
- Core-Rewrite
|
||||
- master
|
||||
- 0.9.0
|
||||
- master
|
||||
|
||||
before_script:
|
||||
- pecl install channel://pecl.php.net/pthreads-2.0.4
|
||||
- mkdir plugins
|
||||
- wget -O plugins/DevTools.phar https://github.com/PocketMine/DevTools/releases/download/v1.9.0/DevTools_v1.9.0.phar
|
||||
- pecl install channel://pecl.php.net/pthreads-2.0.7
|
||||
- pecl install channel://pecl.php.net/weakref-0.2.4
|
||||
- echo | pecl install channel://pecl.php.net/yaml-1.1.1
|
||||
|
||||
script:
|
||||
- php src/tests/ServerSuiteTest.php --no-wizard
|
||||
- php tests/TravisTest.php --no-wizard
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
39
tests/TravisTest.php
Normal file
39
tests/TravisTest.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
*
|
||||
* ____ _ _ __ __ _ __ __ ____
|
||||
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
|
||||
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
|
||||
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
|
||||
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* @author PocketMine Team
|
||||
* @link http://www.pocketmine.net/
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
$server = proc_open("php src/pocketmine/PocketMine.php --no-wizard", [
|
||||
0 => ["pipe", "w"],
|
||||
1 => ["file", "php://stdout", "w"],
|
||||
2 => ["file", "php://stderr", "w"]
|
||||
], $pipes);
|
||||
|
||||
fwrite($pipes[0], "version\nmakeserver\nstop\n\n");
|
||||
|
||||
fclose($pipes[0]);
|
||||
|
||||
echo "\n\nReturn value: ". proc_close($server) ."\n";
|
||||
|
||||
if(count(glob("plugins/DevTools/PocketMine-MP*.phar")) === 0){
|
||||
echo "No server Phar created!\n";
|
||||
exit(1);
|
||||
}else{
|
||||
exit(0);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user