Playing around with Travis-ci.

This commit is contained in:
jgen 2014-02-10 00:33:57 -05:00
parent 5b0f0b4bef
commit c3835ceea9
2 changed files with 42 additions and 0 deletions

24
.travis.yml Normal file
View file

@ -0,0 +1,24 @@
language: php
# list any PHP version you want to test against
php:
# using major version aliases
- 5.3
# optionally specify a list of environments, for example to test different RDBMS
env:
- DB=mysql
- DB=pgsql
# execute any number of scripts before the test run, custom env's are available as variables
before_script:
- if [[ "$DB" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS shimmie;" -U postgres; fi
- if [[ "$DB" == "pgsql" ]]; then psql -c "create database shimmie;" -U postgres; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "create database shimmie;" -uroot; fi
- chmod -R 777 .
script: php tests/simple_test.php -database $DB -url http://127.0.0.1/
# configure notifications (email, IRC, campfire etc)
#notifications:
# irc: "irc.freenode.org#travis"
#

18
tests/simple_test.php Normal file
View file

@ -0,0 +1,18 @@
<?php
require_once('../lib/simpletest/autorun.php');
class SimpleTestCase extends UnitTestCase {
var $options;
function SimpleTestCase() {
$options = getopt("database:url:");
}
function testOptions() {
print_r($options);
$this->assertTrue(true);
}
}