From 0ba2b29a7562eb0e3ed0946a9fc2d7b87b8017e3 Mon Sep 17 00:00:00 2001 From: Priit Tamboom Date: Tue, 30 Sep 2014 12:13:02 +0300 Subject: [PATCH 1/2] added robot script --- .rubocop.yml | 1 + bin/robot | 29 +++++++++++++++++++++++++++++ config/deploy.rb | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100755 bin/robot diff --git a/.rubocop.yml b/.rubocop.yml index 42199a842..ce05b727c 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -9,6 +9,7 @@ AllCops: # epp support files until 'complexity issues' will be solved - 'spec/support/epp.rb' - 'spec/support/epp_contact_xml_builder.rb' + - 'vendor/bundle/**/*' Metrics/LineLength: Max: 120 diff --git a/bin/robot b/bin/robot new file mode 100755 index 000000000..bd9fd3eef --- /dev/null +++ b/bin/robot @@ -0,0 +1,29 @@ +#!/bin/bash -e + +# +# Build and run everything for automatic tests +# +cd ../test-registry +git pull origin master +bundle install --deployment + +# cp config/secrets-example.yml config/secrets.yml +# create manually config/database.yml + +RAILS_ENV=test bundle exec rake db:reset +RAILS_ENV=test bundle exec rake assets:precompile + +echo "GIT_LAST_COMMITS" +git log origin/master -n 15 --pretty=oneline | sed -r '/^.{40} Merge branch/d' | sed -r 's/^.{40}/Latests: /' +echo "END_OF_GIT_LAST_COMMITS" + +# run rubocop +echo "RUBOCOP_RESULTS" +rubocop +echo "END_OF_RUBOCOP_RESULTS" + +# run tests +echo "TEST_RESULTS" +RAILS_ENV=test bundle exec rake test:other +echo "END_OF_TEST_RESULTS" + diff --git a/config/deploy.rb b/config/deploy.rb index 4414d4ea6..16db67346 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -56,7 +56,7 @@ task setup: :environment do queue! %(chmod g+rx,u+rwx "#{deploy_to}/shared/public/system") queue! %(touch "#{deploy_to}/shared/config/database.yml") - queue %(echo '-----> Be sure to edit 'shared/config/database.yml'.') + queue %(echo '-----> Be sure to edit 'shared/config/database.yml'.') end desc 'Deploys the current version to the server.' From 4c5a20c83bfaf22bf30e346a2784e1316385e9fe Mon Sep 17 00:00:00 2001 From: Priit Tamboom Date: Tue, 30 Sep 2014 12:21:09 +0300 Subject: [PATCH 2/2] Updated robot script --- bin/robot | 1 - 1 file changed, 1 deletion(-) diff --git a/bin/robot b/bin/robot index bd9fd3eef..ec2b8f83b 100755 --- a/bin/robot +++ b/bin/robot @@ -3,7 +3,6 @@ # # Build and run everything for automatic tests # -cd ../test-registry git pull origin master bundle install --deployment