added robot script

This commit is contained in:
Priit Tamboom 2014-09-30 12:13:02 +03:00
parent 14f9304c6d
commit 0ba2b29a75
3 changed files with 31 additions and 1 deletions

View file

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

29
bin/robot Executable file
View file

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

View file

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