add travis

This commit is contained in:
Benjamin Neff 2015-06-11 02:47:21 +02:00
parent fe94b0f646
commit c7a8bb5f33
4 changed files with 29 additions and 2 deletions

18
.travis.yml Normal file
View file

@ -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"

View file

@ -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

6
lib/tasks/tests.rake Normal file
View file

@ -0,0 +1,6 @@
namespace :ci do
namespace :travis do
desc "Run specs"
task run: %w(spec)
end
end

4
script/ci/travis.sh Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
command="bundle exec rake --trace ci:travis:run"
exec $command