Update travis config

#203
This commit is contained in:
Artur Beljajev 2016-10-19 18:21:50 +03:00
parent 2092767f54
commit b687144f06
2 changed files with 14 additions and 23 deletions

View file

@ -1,35 +1,26 @@
language: ruby
rvm:
- 2.2
env:
- DB=postgresql
sudo: false
before_install:
- gem install bundler
- "rm ${BUNDLE_GEMFILE}.lock"
bundler_args: --without development production
before_script:
- psql -c 'create database registry_test;' -U postgres
- psql -c 'create database registry_whois_test;' -U postgres
- psql -c 'create database registry_api_log_test;' -U postgres
- bundle update
- cp config/application-example.yml config/application.yml
- cp config/secrets-example.yml config/secrets.yml
- cp config/database-travis.yml config/database.yml
- RAILS_ENV=test bundle exec rake db:all:drop
- RAILS_ENV=test bundle exec rake db:all:setup
- "psql -c 'create database registry_test;' -U postgres"
- "psql -c 'create database registry_whois_test;' -U postgres"
- "psql -c 'create database registry_api_log_test;' -U postgres"
- "cp config/application-example.yml config/application.yml"
- "cp config/secrets-example.yml config/secrets.yml"
- "cp config/database-travis.yml config/database.yml"
- "RAILS_ENV=test bundle exec rake db:all:create"
- "RAILS_ENV=test bundle exec rake db:all:schema:load"
- "RAILS_ENV=test bundle exec rake db:migrate"
script:
- RAILS_ENV=test bundle exec rake
cache: bundler
- "RAILS_ENV=test bundle exec rspec"
services:
- postgresql
addons:
postgresql: "9.3"
postgresql: "9.4"
notifications:
email:
- priit@gitlab.eu
- martin@gitlab.eu
- developers@tld.ee
branches:
only:
- master
- alpha
- staging