diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0b4bcbb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: ruby + +rvm: + - 2.2 + - 2.1 + +sudo: false +cache: + bundler: true + +branches: + only: + - 'master' + +before_install: gem install bundler +bundler_args: "--deployment --without development --jobs=3 --retry=3" + +script: "./script/ci/travis.sh" diff --git a/Rakefile b/Rakefile index 0914384..913a3af 100644 --- a/Rakefile +++ b/Rakefile @@ -21,7 +21,6 @@ load "rails/tasks/statistics.rake" Bundler::GemHelper.install_tasks -require "rspec/core/rake_task" -RSpec::Core::RakeTask.new(:spec) +Rails.application.load_tasks task default: :spec diff --git a/lib/tasks/tests.rake b/lib/tasks/tests.rake new file mode 100644 index 0000000..6f9c7b7 --- /dev/null +++ b/lib/tasks/tests.rake @@ -0,0 +1,6 @@ +namespace :ci do + namespace :travis do + desc "Run specs" + task run: %w(spec) + end +end diff --git a/script/ci/travis.sh b/script/ci/travis.sh new file mode 100755 index 0000000..0905da9 --- /dev/null +++ b/script/ci/travis.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +command="bundle exec rake --trace ci:travis:run" +exec $command \ No newline at end of file