mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-11 13:58:54 +00:00
[ticket/12941] Check for Sami parse errors on Travis CI.
PHPBB3-12941
This commit is contained in:
parent
4f131c2248
commit
873d1c6d57
4 changed files with 49 additions and 0 deletions
|
@ -37,6 +37,7 @@ before_script:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
|
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
|
||||||
|
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
|
||||||
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
|
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
|
||||||
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
|
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
|
||||||
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
|
- phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml
|
||||||
|
|
33
travis/check-sami-parse-errors.sh
Executable file
33
travis/check-sami-parse-errors.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This file is part of the phpBB Forum Software package.
|
||||||
|
#
|
||||||
|
# @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
# @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
|
||||||
|
|
||||||
|
DB=$1
|
||||||
|
TRAVIS_PHP_VERSION=$2
|
||||||
|
|
||||||
|
if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
|
||||||
|
then
|
||||||
|
# Workarounds for
|
||||||
|
# https://github.com/fabpot/Sami/issues/116
|
||||||
|
# and
|
||||||
|
# https://github.com/fabpot/Sami/issues/117
|
||||||
|
errors=$(
|
||||||
|
unbuffer phpBB/vendor/bin/sami.php parse travis/sami.conf.php -v | \
|
||||||
|
sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | \
|
||||||
|
grep "ERROR: " | \
|
||||||
|
tee /dev/tty | \
|
||||||
|
wc -l
|
||||||
|
)
|
||||||
|
if [ "$errors" != "0" ]
|
||||||
|
then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -17,6 +17,7 @@ TRAVIS_PHP_VERSION=$2
|
||||||
if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
|
if [ "$TRAVIS_PHP_VERSION" == "5.3.3" -a "$DB" == "mysqli" ]
|
||||||
then
|
then
|
||||||
travis/setup-exiftool.sh
|
travis/setup-exiftool.sh
|
||||||
|
travis/setup-unbuffer.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DB" == "mariadb" ]
|
if [ "$DB" == "mariadb" ]
|
||||||
|
|
14
travis/setup-unbuffer.sh
Executable file
14
travis/setup-unbuffer.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# This file is part of the phpBB Forum Software package.
|
||||||
|
#
|
||||||
|
# @copyright (c) phpBB Limited <https://www.phpbb.com>
|
||||||
|
# @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
|
||||||
|
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y expect-dev
|
Loading…
Add table
Reference in a new issue