From 4506e925360395c6107e1d3fcc0bb787ab015bb5 Mon Sep 17 00:00:00 2001 From: Simon Welsh Date: Fri, 21 Sep 2012 15:34:12 +1200 Subject: [PATCH] Adds Travis testing to the CMS --- .travis.yml | 30 ++++++++++++++++++++++++++++++ tests/travis/before_script | 10 ++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .travis.yml create mode 100755 tests/travis/before_script diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..edfd3405 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: php +php: + - 5.3 + - 5.4 + +env: + - TESTDB=MYSQL + - TESTDB=PGSQL + +matrix: + exclude: + - php: 5.4 + env: TESTDB=PGSQL + +before_script: + - ./tests/travis/before_script ~/builds/ss + - cd ~/builds/ss + +script: + - php framework/cli-script.php dev/tests/module/cms + +branches: + except: + - translation-staging + - 2.4 + +notifications: + irc: + channels: + - "irc.freenode.org#silverstripe" diff --git a/tests/travis/before_script b/tests/travis/before_script new file mode 100755 index 00000000..3c1c5928 --- /dev/null +++ b/tests/travis/before_script @@ -0,0 +1,10 @@ +BUILD_DIR=$1 +git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-installer.git $BUILD_DIR +git clone --depth=100 --quiet git://github.com/silverstripe-labs/silverstripe-sqlite3.git $BUILD_DIR/sqlite3 +git clone --depth=100 --quiet git://github.com/silverstripe/silverstripe-postgresql.git $BUILD_DIR/postgresql +git clone --depth=100 --quiet -b ${TRAVIS_BRANCH:-master} git://github.com/silverstripe/sapphire.git $BUILD_DIR/framework +cp $BUILD_DIR/framework/tests/travis/_ss_environment.php $BUILD_DIR +cp $BUILD_DIR/framework/tests/travis/_config.php $BUILD_DIR/mysite +cp -r . $BUILD_DIR/cms + +cd $BUILD_DIR