language: ruby
cache: bundler

rvm:
  - 2.2
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - truffleruby
  - jruby-head
  - ruby-head
  - jruby-9.1.8.0
  - jruby-head
  - rbx-3

matrix:
  allow_failures:
    - rvm: truffleruby
    - rvm: ruby-head
    - rvm: jruby-head
    - rvm: rbx-3
  fast_finish: true

script:
  # Unit test
  - bundle exec rake
  # Install test
  - gem build rb-inotify.gemspec
  - gem install rb-inotify-*.gem
  - "gem list | grep rb-inotify"
  - ruby -e 'require "rb-inotify"'
  # Integration test: guard
  - git clone https://github.com/matthewd/guard -b inotify-test-target --depth 1
  - cd guard
  - export BUNDLE_GEMFILE=$PWD/Gemfile
  - bundle install --without development
  - bundle exec rake
  - cd ..
  # Integration test: listen
  - git clone https://github.com/matthewd/listen -b inotify-test-target --depth 1
  - cd listen
  - export BUNDLE_GEMFILE=$PWD/Gemfile
  - gem install ruby_dep
  - bundle install --without development
  - bundle exec rake

language: ruby
cache: bundler

rvm:
  - 2.2
  - 2.3
  - 2.4
  - 2.5
  - 2.6
  - truffleruby
  - jruby-head
  - ruby-head
  - jruby
  - jruby-head
  - rbx-3

matrix:
  allow_failures:
    - rvm: truffleruby
    - rvm: ruby-head
    - rvm: jruby-head
    - rvm: rbx-3
  fast_finish: true

script:
  # Unit test
  - bundle exec rake
  # Install test
  - gem build rb-inotify.gemspec
  - gem install rb-inotify-*.gem
  - "gem list | grep rb-inotify"
  - ruby -e 'require "rb-inotify"'
  # Integration test: guard
  - git clone https://github.com/matthewd/guard -b inotify-test-target --depth 1
  - cd guard
  - export BUNDLE_GEMFILE=$PWD/Gemfile
  - bundle install --without development
  - bundle exec rake
  - cd ..
  # Integration test: listen
  - git clone https://github.com/matthewd/listen -b inotify-test-target --depth 1
  - cd listen
  - export BUNDLE_GEMFILE=$PWD/Gemfile
  - gem install ruby_dep
  - bundle install --without development
  - bundle exec rake

Test on latest stable jruby.
Test on latest stable jruby.
