mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
39 lines
930 B
Bash
Executable file
39 lines
930 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Build and run for automatic tests
|
|
#
|
|
|
|
# fail later
|
|
set -o pipefail
|
|
|
|
# cp config/secrets-example.yml config/secrets.yml
|
|
# create manually config/database.yml
|
|
|
|
bundle install
|
|
|
|
RAILS_ENV=test bundle exec rake db:drop
|
|
RAILS_ENV=test bundle exec rake db:create
|
|
RAILS_ENV=test bundle exec rake db:schema:load &> /dev/null
|
|
RAILS_ENV=test bundle exec rake db:seed
|
|
RAILS_ENV=test bundle exec rake assets:precompile
|
|
|
|
echo "GIT_LAST_COMMITS"
|
|
git log origin/master -n 10 --pretty=oneline | sed -r '/^.{40} Merge branch/d' | sed -r 's/^.{40}/Latest: /'
|
|
echo "END_OF_GIT_LAST_COMMITS"
|
|
|
|
echo "RUBOCOP_RESULTS"
|
|
bundle exec rubocop
|
|
echo "END_OF_RUBOCOP_RESULTS"
|
|
|
|
echo "TEST_RESULTS"
|
|
ROBOT=true bundle exec rake test
|
|
echo "END_OF_TEST_RESULTS"
|
|
|
|
echo "SECURITY_RESULTS"
|
|
bundle exec bundle-audit update
|
|
bundle exec bundle-audit
|
|
bundle exec brakeman
|
|
echo "END_OF_SECURITY_RESULTS"
|
|
|
|
# update code review
|
|
bundle exec rubycritic app lib
|