diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6ef8ad5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: ruby +bundler_args: --without development assets production +rvm: + - ree + - 1.8.7 + - rbx-18mode + - jruby-18mode +before_script: + - cp config/database.travis.yml config/database.yml + - RAILS_ENV=test bundle exec rake db:create + - RAILS_ENV=test bundle exec rake db:schema:load + # Install latest phantomjs (Travis have not recent version installed) + - version=phantomjs-1.7.0-linux-i686 + - wget http://phantomjs.googlecode.com/files/$version.tar.bz2 + - tar xjf $version.tar.bz2 + - mv $version phantomjs + - "export PATH=phantomjs/bin:$PATH" + - phantomjs --version +matrix: + allow_failures: + - rvm: rbx-18mode + - rvm: jruby-18mode diff --git a/Gemfile b/Gemfile index bfa241f..36f1156 100644 --- a/Gemfile +++ b/Gemfile @@ -46,12 +46,14 @@ group :development do gem "capistrano" gem "rvm-capistrano" gem 'ruby-debug' + gem 'travis-lint' end gem 'rspec-rails', :group => [:development, :test] gem 'rspec', :group => [:development, :test] group :test do + gem 'rake' gem 'factory_girl_rails' gem 'factory_girl', '~> 2.1.0' gem 'capybara' diff --git a/Gemfile.lock b/Gemfile.lock index b98bb41..9372778 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -88,6 +88,7 @@ GEM eventmachine (>= 0.12.0) ffi (1.2.0) haml (3.1.7) + hashr (0.0.22) highline (1.6.15) hike (1.2.1) htmlentities (4.3.1) @@ -216,6 +217,8 @@ GEM thor (0.16.0) tilt (1.3.3) timeliness (0.3.7) + travis-lint (1.5.0) + hashr (~> 0.0.22) treetop (1.4.12) polyglot polyglot (>= 0.3.1) @@ -267,6 +270,7 @@ DEPENDENCIES pg poltergeist rails (~> 3.2.0) + rake recordselect redcarpet rspec @@ -277,6 +281,7 @@ DEPENDENCIES sass-rails (~> 3.2.0) select2-rails therubyracer + travis-lint uglifier unicode unicorn diff --git a/README.md b/README.md index bb4ce4f..558bd4f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Система составления учебного расписания «Taurus» +Система составления учебного расписания «Taurus» [![Build Status](https://travis-ci.org/AmurSU/taurus.png)](https://travis-ci.org/AmurSU/taurus) ================================================ Веб-ориентированное приложение для составления и публикации учебного расписания для Амурского государственного университета на программной платформе [Ruby on Rails][rails]. diff --git a/config/database.travis.yml b/config/database.travis.yml new file mode 100644 index 0000000..71ab5b7 --- /dev/null +++ b/config/database.travis.yml @@ -0,0 +1,9 @@ +test: + adapter: postgresql + host: 127.0.0.1 + port: 5432 + username: postgres + password: + database: taurus_test + encoding: unicode + min_messages: ERROR