diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..2637740 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,19 @@ +rvm: + - 1.8.7 + - 1.9.2 + - 1.9.3 + +before_script: "./spec/ci/before_script" + +script: "./spec/ci/script" + +env: + - RADIANT_VERSION=1.0.0.rc4 DB=mysql + - RADIANT_VERSION=1.0.0.rc4 DB=postgres + - RADIANT_VERSION=master DB=mysql + - RADIANT_VERSION=master DB=postgres + +notifications: + recipients: + - git@johnmuhl.com + irc: "irc.freenode.org#radiantcms" diff --git a/spec/ci/before_script b/spec/ci/before_script new file mode 100755 index 0000000..a8817bc --- /dev/null +++ b/spec/ci/before_script @@ -0,0 +1,23 @@ +cd ~ +git clone git://github.com/radiant/radiant.git +cd ~/radiant +if [[ $RADIANT_VERSION != "master" ]] +then + git checkout -b $RADIANT_VERSION $RADIANT_VERSION +fi +cp -r ~/builds/*/radiant-archive-extension vendor/extensions/archive +gem install bundler --pre +echo 'gem "radiant-archive-extension", :path => "vendor/extensions/archive"' >> Gemfile +bundle install + +case $DB in + "mysql" ) + mysql -e 'create database radiant_test;' + cp spec/ci/database.mysql.yml config/database.yml;; + "postgres" ) + psql -c 'create database radiant_test;' -U postgres + cp spec/ci/database.postgresql.yml config/database.yml;; +esac + +bundle exec rake db:migrate +bundle exec rake db:migrate:extensions diff --git a/spec/ci/script b/spec/ci/script new file mode 100755 index 0000000..e6869c1 --- /dev/null +++ b/spec/ci/script @@ -0,0 +1,2 @@ +cd ~/radiant +bundle exec rake spec:extensions EXT=archive