diff --git a/.travis.yml b/.travis.yml index 58bf9d25..314c1ac3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,15 @@ sudo: false language: ruby rvm: - 2.1.3 +install: + - . $HOME/.nvm/nvm.sh + - nvm install stable + - nvm use stable + - (cd app/assets/javascripts && npm install) before_script: - export RAILS_ENV=test - cp .example-env .env - bundle exec rake db:create - bundle exec rake db:schema:load +script: + - bundle exec rspec && (cd app/assets/javascripts && npm test) diff --git a/bin/jenkins-test.sh b/bin/jenkins-test.sh index 0afd3f66..f70a1e50 100755 --- a/bin/jenkins-test.sh +++ b/bin/jenkins-test.sh @@ -3,6 +3,7 @@ # jenkins machine prerequisites # sudo aptitude -q -y install libpq-dev # install rvm with user gemsets +# install node and npm source "$HOME/.rvm/scripts/rvm" rvm use $(cat .ruby-version) || \ @@ -19,10 +20,15 @@ export RAILS_ENV=test cp .example-env .env sed -i -e "s/DB_USERNAME='.*'/DB_USERNAME='jenkins'/" .env -#test +# rspec tests bundle install rake db:drop rake db:create rake db:schema:load rake db:migrate COVERAGE=on bundle exec rspec + +# javascript tests +cd app/assets/javascripts +npm install +npm test