forked from vlucas/Spot
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vlucas#40 from TheSavior/master
Adding support for travis-ci.org continuous integration
- Loading branch information
Showing
4 changed files
with
89 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# see http://about.travis-ci.org/docs/user/languages/php/ for more hints | ||
language: php | ||
|
||
# list any PHP version you want to test against | ||
php: | ||
# using major version aliases | ||
- 5.3.3 | ||
- 5.3 | ||
- 5.4 | ||
|
||
services: | ||
- mongodb | ||
|
||
# optionally specify a list of environments, for example to test different RDBMS | ||
env: | ||
- DB=mysql | ||
- DB=mongo | ||
|
||
# execute any number of scripts before the test run, custom env's are available as variables | ||
before_script: | ||
- if [[ "$DB" == "mongo" ]]; then | ||
pecl -q install mongo && echo "extension=mongo.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; | ||
fi | ||
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS spot_test;" -uroot; fi | ||
|
||
# omitting "script:" will default to phpunit | ||
# use the $DB env variable to determine the phpunit.xml to use | ||
script: phpunit --configuration phpunit_$DB.xml --coverage-text | ||
|
||
# configure notifications (email, IRC, campfire etc) | ||
#notifications: | ||
# irc: "irc.freenode.org#travis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
syntaxCheck="false" | ||
bootstrap="./tests/init.php" | ||
> | ||
<php> | ||
<env name="db_type" value="mysql" /> | ||
<env name="db_dsn" value="mysql://root@localhost/spot_test" /> | ||
</php> | ||
|
||
<testsuites> | ||
<testsuite name="Spot"> | ||
<directory suffix=".php">./tests/Test</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters