---

# Configuration

branches:
  only:
    - master

cache:
  bundler: true

env:
  - NLT_DB_USER=travis NLT_DB_PASS=''

language: ruby

rvm:
  - 2.3.1

services:
  - redis-server

# Phases

before_install:
  - gem update --system
  - gem install bundler
  - source bin/phantomjs.sh

script:
  - RAILS_ENV=test bin/rake db:drop db:create db:structure:load max_mind:extract
  - bin/rake test rubocop

before_deploy:
  - openssl aes-256-cbc -K $encrypted_5358ea3d75c2_key
    -iv $encrypted_5358ea3d75c2_iv -in config/deploy/rsa_key.enc
    -out config/deploy/rsa_key -d

deploy:
  provider: script
  script: rvm $TRAVIS_RUBY_VERSION do bin/cap production deploy
  skip_cleanup: true
  on:
    branch: master

---

# Configuration

addons:
  postgresql: '9.6'

branches:
  only:
    - master

cache:
  bundler: true

dist: trusty

env:
  - NLT_DB_USER=travis NLT_DB_PASS=''

language: ruby

rvm:
  - 2.3.1

services:
  - postgresql
  - redis-server

sudo: false

# Phases

before_install:
  - gem update --system
  - gem install bundler
  - source bin/phantomjs.sh

script:
  - RAILS_ENV=test bin/rake db:drop db:create db:structure:load max_mind:extract
  - bin/rake test rubocop

before_deploy:
  - openssl aes-256-cbc -K $encrypted_5358ea3d75c2_key
    -iv $encrypted_5358ea3d75c2_iv -in config/deploy/rsa_key.enc
    -out config/deploy/rsa_key -d

deploy:
  provider: script
  script: rvm $TRAVIS_RUBY_VERSION do bin/cap production deploy
  skip_cleanup: true
  on:
    branch: master

Make sure we test against the same pg we're using
Make sure we test against the same pg we're using

It should fix some CI warnings:

```
psql:/home/travis/build/alabs/nolotiro.org/db/structure.sql:9: ERROR:
  unrecognized configuration parameter "lock_timeout"

psql:/home/travis/build/alabs/nolotiro.org/db/structure.sql:10: ERROR:
  unrecognized configuration parameter "idle_in_transaction_session_timeout"

psql:/home/travis/build/alabs/nolotiro.org/db/structure.sql:15: ERROR:
  unrecognized configuration parameter "row_security"
```
