1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-17 14:18:24 +01:00

[task/travis] Adding Travis Continuous Intergration Support

PHPBB3-10718
This commit is contained in:
Michael Cullum 2012-03-21 22:57:29 +00:00
parent dad37a4329
commit 4dafcc2525
3 changed files with 91 additions and 0 deletions

33
.travis.yml Normal file
View File

@ -0,0 +1,33 @@
language: php
php:
- 5.2
- 5.3
- 5.4
env:
- DB=mysql
- DB=postgres
before_script:
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database phpbb_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS phpbb_tests;'; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.2' ]; then pear install --force phpunit/DbUnit; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' ]; then pyrus install --force phpunit/DbUnit; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.4' ]; then pyrus install --force phpunit/DbUnit; fi"
- phpenv rehash
script:
- phpunit --configuration travis/$DB.travis.xml
notifications:
email:
recipients:
- m@michaelcullum.com
on_success: never
on_failure: always
branches:
only:
develop
task/travis

28
travis/mysql.travis.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
strict="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests/</directory>
</testsuite>
</testsuites>
<php>
<const name="dbms" value="mysqli"/>
<const name="dbhost" value="0.0.0.0" />
<const name="dbport" value="3306" />
<const name="dbname" value="phpbb_tests" />
<const name="dbuser" value="root" />
<const name="dbpasswd" value="" />
<const name="table_prefix" value="phpbb_"/>
</php>
</phpunit>

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="true"
backupStaticAttributes="true"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="true"
strict="true"
bootstrap="../tests/bootstrap.php">
<testsuites>
<testsuite name="phpBB Test Suite">
<directory suffix="_test.php">../tests/</directory>
</testsuite>
</testsuites>
<php>
<!-- "Real" test database -->
<!-- uncomment, otherwise sqlite memory runs -->
<const name="dbms" value="postgres"/>
<const name="dbhost" value="localhost" />
<const name="dbport" value="5432" />
<const name="dbname" value="phpbb_tests" />
<const name="dbuser" value="postgres" />
<const name="dbpasswd" value="" />
<const name="table_prefix" value="phpbb_"/>
</php>
</phpunit>