mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
Shell-based CI with lint scans
This commit is contained in:
parent
8f3b95164a
commit
707847b46e
@ -11,7 +11,7 @@ before_script:
|
|||||||
- echo | pecl install channel://pecl.php.net/yaml-2.0.0RC7
|
- echo | pecl install channel://pecl.php.net/yaml-2.0.0RC7
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- php tests/TravisTest.php
|
- ./tests/lint.sh && ./tests/run.sh
|
||||||
|
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
|
8
tests/lint.sh
Executable file
8
tests/lint.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo Running PHP lint scans...
|
||||||
|
shopt -s globstar
|
||||||
|
for file in src/pocketmine/*.php src/pocketmine/**/*.php; do
|
||||||
|
OUTPUT=`php -l "$file"`
|
||||||
|
[ $? -ne 0 ] && echo -n "$OUTPUT" && exit 1
|
||||||
|
done
|
||||||
|
echo Lint scan completed successfully.
|
8
tests/run.sh
Executable file
8
tests/run.sh
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo -e "version\nmakeserver\nstop\n" | php src/pocketmine/PocketMine.php --no-wizard --disable-ansi
|
||||||
|
if ls plugins/DevTools/PocketMine*.phar >/dev/null 2>&1; then
|
||||||
|
echo Server phar created successfully.
|
||||||
|
else
|
||||||
|
echo No phar created!
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user