Skip to content

Commit 91bbbae

Browse files
committed
Add travis testing
1 parent 78b4353 commit 91bbbae

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

.travis.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
language: php
2+
php:
3+
- 5.3.3
4+
- 5.3
5+
- 5.4
6+
- 5.5
7+
- 5.6
8+
- hhvm
9+
10+
env:
11+
global:
12+
- EXTNAME="phpbbde/movemessage"
13+
- SNIFF="0"
14+
- PHPBB_BRANCH="ticket/12483" # - PHPBB_BRANCH="develop-ascraeus"
15+
matrix:
16+
- DB=mysql
17+
18+
branches:
19+
only:
20+
- master
21+
- /^develop-.*$/
22+
23+
install:
24+
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
25+
- cd ../../phpBB3
26+
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
27+
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
28+
29+
before_script:
30+
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
31+
32+
script:
33+
- sh -c "if [ '$SNIFF' != '0' ]; then travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION; fi"
34+
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php
35+
36+
matrix:
37+
include:
38+
- php: 5.4
39+
env: DB=mariadb
40+
- php: 5.4
41+
env: DB=postgres
42+
- php: 5.4
43+
env: DB=sqlite3
44+
allow_failures:
45+
- php: hhvm
46+
fast_finish: true

phpunit.xml.dist

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<phpunit backupGlobals="true"
4+
backupStaticAttributes="true"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
processIsolation="false"
10+
stopOnFailure="false"
11+
syntaxCheck="false"
12+
verbose="true"
13+
bootstrap="../../../../tests/bootstrap.php"
14+
>
15+
<testsuites>
16+
<testsuite name="Extension Test Suite">
17+
<directory suffix="_test.php">./tests</directory>
18+
<exclude>./tests/functional</exclude>
19+
</testsuite>
20+
<testsuite name="Extension Functional Tests">
21+
<directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">./tests/functional/</directory>
22+
</testsuite>
23+
</testsuites>
24+
25+
<filter>
26+
<blacklist>
27+
<directory>./tests/</directory>
28+
</blacklist>
29+
<whitelist processUncoveredFilesFromWhitelist="true">
30+
<directory suffix=".php">./</directory>
31+
<exclude>
32+
<directory suffix=".php">./language/</directory>
33+
<directory suffix=".php">./migrations/</directory>
34+
<directory suffix=".php">./tests/</directory>
35+
</exclude>
36+
</whitelist>
37+
</filter>
38+
</phpunit>

travis/prepare-phpbb.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
#
3+
# @copyright (c) 2014 phpBB Group
4+
# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
5+
#
6+
set -e
7+
set -x
8+
9+
EXTNAME=$1
10+
BRANCH=$2
11+
EXTPATH_TEMP=$3
12+
13+
# Copy extension to a temp folder
14+
mkdir ../../tmp
15+
cp -R . ../../tmp
16+
cd ../../
17+
18+
# Clone phpBB
19+
git clone --depth=1 "git://github.com/nickvergessen/phpbb.git" "phpBB3" --branch=$BRANCH

0 commit comments

Comments
 (0)