From 6b9ffa39d3d22939e41a8c6e8eafea61999437de Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 11 Mar 2013 01:44:38 +0100 Subject: [PATCH] Travis support --- .travis.yml | 24 +++++++++++++++++++++ README.md | 2 ++ tests/travis/_config.php | 22 +++++++++++++++++++ tests/travis/_ss_environment.php | 37 ++++++++++++++++++++++++++++++++ tests/travis/before_script | 20 +++++++++++++++++ 5 files changed, 105 insertions(+) create mode 100644 .travis.yml create mode 100644 tests/travis/_config.php create mode 100644 tests/travis/_ss_environment.php create mode 100755 tests/travis/before_script diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..7c90196 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: php +php: + - 5.3 + - 5.4 + +env: + - TESTDB=MYSQL CORE_RELEASE=3.0 + - TESTDB=MYSQL CORE_RELEASE=master + - TESTDB=PGSQL CORE_RELEASE=master + +matrix: + exclude: + - php: 5.4 + env: TESTDB=PGSQL CORE_RELEASE=master + - php: 5.4 + env: TESTDB=MYSQL CORE_RELEASE=3.0 + +before_script: + - phpenv rehash + - ./tests/travis/before_script ~/builds/ss + - cd ~/builds/ss + +script: + - phpunit dms/tests/ \ No newline at end of file diff --git a/README.md b/README.md index f39739f..931633c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Document Management Module (DMS) +[![Build Status](https://travis-ci.org/silverstripe-labs/silverstripe-dms.png?branch=master)](https://travis-ci.org/silverstripe-labs/silverstripe-dms) + ## Overview The module adds a new `DMSDocument` model which allows management diff --git a/tests/travis/_config.php b/tests/travis/_config.php new file mode 100644 index 0000000..3508957 --- /dev/null +++ b/tests/travis/_config.php @@ -0,0 +1,22 @@ + + +BUILD_DIR=$1 + +# Fetch all dependencies +echo "Checking out installer@$CORE_RELEASE" +git clone --depth=100 --quiet --branch $CORE_RELEASE git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR +echo "Checking out framework@$CORE_RELEASE" +git clone --depth=100 --quiet --branch $CORE_RELEASE git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework +echo "Checking out postgresql" +git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql + +# Copy setup files +cp ./tests/travis/_ss_environment.php $BUILD_DIR +cp ./tests/travis/_config.php $BUILD_DIR/mysite + +# Copy actual project code into build directory (checked out by travis) +cp -r . $BUILD_DIR/dms + +cd $BUILD_DIR