language: ruby

rvm:
  - ruby-head
  - 2.4.6
  - 2.3.8
gemfile:
  - 'gemfiles/action_mailer_edge.gemfile'
  - 'gemfiles/action_mailer_52.gemfile'
  - 'gemfiles/action_mailer_51.gemfile'
env:
  - INTEGRATION_TEST=false
  - INTEGRATION_TEST=true

sudo: false

script:
  - 'bundle exec rubocop -c .rubocop.yml'
  - 'bundle exec rspec'
  - 'if [ $INTEGRATION_TEST == "true" ]; then bundle exec rspec integration_test; fi'
after_success:
  - 'bundle exec codeclimate-test-reporter'

cache: bundler

matrix:
  exclude:
    - env: INTEGRATION_TEST=true
    - rvm: 2.3.8
      gemfile: gemfiles/action_mailer_51.gemfile
    - rvm: 2.3.8
      gemfile: gemfiles/action_mailer_edge.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/action_mailer_51.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/action_mailer_edge.gemfile
  include:
    - rvm: 2.4.6
      gemfile: gemfiles/action_mailer_52.gemfile
      env: INTEGRATION_TEST=true
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/action_mailer_edge.gemfile

language: ruby

rvm:
  - ruby-head
  - 2.4
  - 2.3
gemfile:
  - 'gemfiles/action_mailer_edge.gemfile'
  - 'gemfiles/action_mailer_52.gemfile'
  - 'gemfiles/action_mailer_51.gemfile'
env:
  - INTEGRATION_TEST=false
  - INTEGRATION_TEST=true

sudo: false

script:
  - 'bundle exec rubocop -c .rubocop.yml'
  - 'bundle exec rspec'
  - 'if [ $INTEGRATION_TEST == "true" ]; then bundle exec rspec integration_test; fi'
after_success:
  - 'bundle exec codeclimate-test-reporter'

cache: bundler

matrix:
  exclude:
    - env: INTEGRATION_TEST=true
    - rvm: 2.3
      gemfile: gemfiles/action_mailer_51.gemfile
    - rvm: 2.3
      gemfile: gemfiles/action_mailer_edge.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/action_mailer_51.gemfile
    - rvm: ruby-head
      gemfile: gemfiles/action_mailer_edge.gemfile
  include:
    - rvm: 2.4
      gemfile: gemfiles/action_mailer_52.gemfile
      env: INTEGRATION_TEST=true
  allow_failures:
    - rvm: ruby-head
    - gemfile: gemfiles/action_mailer_edge.gemfile

Remove patch version from CI target ruby version
Remove patch version from CI target ruby version
