name: ubuntu-rvm

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [ 'jruby-head', 'jruby-9.2.9.0', 'ruby-head', '2.3.8', '2.2.10' ]
    steps:
    - uses: actions/checkout@master
    - name: Set up RVM
      run: |
        curl -sSL https://get.rvm.io | bash
    - name: Set up Ruby
      run: |
        source $HOME/.rvm/scripts/rvm
        rvm install ${{ matrix.ruby }} --binary
        rvm --default use ${{ matrix.ruby }}
    - name: Install dependencies
      run: |
        source $HOME/.rvm/scripts/rvm
        gem install minitest
    - name: Run test
      run: |
        source $HOME/.rvm/scripts/rvm
        ruby -Ilib exe/rake
