dist: xenial
language: ruby
rvm: 2.5.3
gemfile:
  - Gemfile
services:
  - postgresql
  - redis-server
script: bundle exec rake test
before_install:
  - psql -c 'CREATE DATABASE searchkick_test;' -U postgres || true
  - ./test/ci/install_elasticsearch.sh
cache:
  directories:
    - $HOME/elasticsearch
env:
  - ELASTICSEARCH_VERSION=6.5.0
jdk: oraclejdk8
matrix:
  include:
    - gemfile: Gemfile
    - gemfile: test/gemfiles/activerecord51.gemfile
      env: ELASTICSEARCH_VERSION=6.0.0
    - gemfile: test/gemfiles/activerecord50.gemfile
      env: ELASTICSEARCH_VERSION=5.6.10
    - gemfile: test/gemfiles/activerecord42.gemfile
      env: ELASTICSEARCH_VERSION=5.0.1
    - gemfile: test/gemfiles/mongoid6.gemfile
      services:
        - mongodb
        - redis-server
    - gemfile: test/gemfiles/mongoid5.gemfile
      services:
        - mongodb
        - redis-server
notifications:
  email:
    on_success: never
    on_failure: change

dist: xenial
language: ruby
rvm: 2.5.3
gemfile:
  - Gemfile
services:
  - postgresql
  - redis-server
script: bundle exec rake test
before_install:
  - psql -c 'CREATE DATABASE searchkick_test;' -U postgres || true
  - ./test/ci/install_elasticsearch.sh
cache:
  directories:
    - $HOME/elasticsearch
env:
  - ELASTICSEARCH_VERSION=6.5.0
jdk: oraclejdk8
matrix:
  include:
    - gemfile: Gemfile
    - gemfile: test/gemfiles/activerecord51.gemfile
      env: ELASTICSEARCH_VERSION=6.0.0
    - gemfile: test/gemfiles/activerecord50.gemfile
      env: ELASTICSEARCH_VERSION=5.6.10
    - gemfile: test/gemfiles/activerecord42.gemfile
      env: ELASTICSEARCH_VERSION=5.0.1
    - gemfile: test/gemfiles/mongoid6.gemfile
      services:
        - mongodb
        - redis-server
    - gemfile: test/gemfiles/mongoid5.gemfile
      services:
        - mongodb
        - redis-server
  allow_failures:
    - gemfile: Gemfile
      env: ELASTICSEARCH_VERSION=7.0.0-alpha1
notifications:
  email:
    on_success: never
    on_failure: change

Test ES 7 on Travis
Test ES 7 on Travis
