add jenkins-test.sh script
This commit is contained in:
parent
c9ebfee968
commit
38f46bd8c4
1 changed files with 21 additions and 0 deletions
21
bin/jenkins-test.sh
Executable file
21
bin/jenkins-test.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash -l
|
||||
|
||||
#prerequisites
|
||||
#sudo aptitude -q -y install libpq-dev
|
||||
|
||||
source "$HOME/.rvm/scripts/rvm"
|
||||
rvm install $(cat .ruby-version)
|
||||
rvm gemset use $(cat .ruby-gemset)
|
||||
gem install bundler
|
||||
|
||||
set -x
|
||||
|
||||
#configure environment
|
||||
export RAILS_ENV=test
|
||||
cp .example-env .env
|
||||
sed -i -e "s/DB_USERNAME='.*'/DB_USERNAME='jenkins'/" .env
|
||||
|
||||
#test
|
||||
bundle install
|
||||
rake db:create db:test:prepare
|
||||
bundle exec rspec
|
Loading…
Reference in a new issue