From b687144f062232ad44e16552dcf4c621cfe7d8a7 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 19 Oct 2016 18:21:50 +0300 Subject: [PATCH] Update travis config #203 --- .travis.yml | 35 +++++++++++++---------------------- config/database-travis.yml | 2 +- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8054d8ea9..93fd11d42 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/config/database-travis.yml b/config/database-travis.yml index bf0765265..e1fe34d16 100644 --- a/config/database-travis.yml +++ b/config/database-travis.yml @@ -4,7 +4,7 @@ default: &default encoding: unicode pool: 5 username: postgres - password: + password: test: <<: *default