From c3835ceea99c5d6bc58c202454ef19d0b12e7769 Mon Sep 17 00:00:00 2001 From: jgen Date: Mon, 10 Feb 2014 00:33:57 -0500 Subject: [PATCH] Playing around with Travis-ci. --- .travis.yml | 24 ++++++++++++++++++++++++ tests/simple_test.php | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .travis.yml create mode 100644 tests/simple_test.php diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..2061ee66 --- /dev/null +++ b/.travis.yml @@ -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" +# \ No newline at end of file diff --git a/tests/simple_test.php b/tests/simple_test.php new file mode 100644 index 00000000..95b7e9d4 --- /dev/null +++ b/tests/simple_test.php @@ -0,0 +1,18 @@ +assertTrue(true); + } + +}