name: Development

on: [push, pull_request]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        ruby: [2.4, 2.5, 2.6, 2.7, jruby, truffleruby-head]
        gemfile: [Gemfile, Gemfile.turnip3]
    runs-on: ${{matrix.os}}
    steps:
    - uses: actions/checkout@v2

    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{matrix.ruby}}

    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: bundle-use-ruby-${{matrix.os}}-${{matrix.ruby}}-${{hashFiles('**/${{matrix.gemfile}}')}}
        restore-keys: |
          bundle-use-ruby-${{matrix.os}}-${{matrix.ruby}}-${{hashFiles('**/${{matrix.gemfile}}')}}

    - name: Bundle install...
      run: |
        bundle config path vendor/bundle
        bundle install --gemfile=${{matrix.gemfile}}

    - run: bundle exec rspec spec

name: Development

on: [push, pull_request]

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        ruby: [2.4, 2.5, 2.6, 2.7, jruby]
        gemfile: [Gemfile, Gemfile.turnip3]
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2

    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{matrix.ruby}}

    - uses: actions/cache@v1
      with:
        path: vendor/bundle
        key: bundle-use-ruby-${{matrix.os}}-${{matrix.ruby}}-${{hashFiles('**/${{matrix.gemfile}}')}}
        restore-keys: |
          bundle-use-ruby-${{matrix.os}}-${{matrix.ruby}}-${{hashFiles('**/${{matrix.gemfile}}')}}

    - name: Bundle install...
      run: |
        bundle config path vendor/bundle
        bundle install --gemfile=${{matrix.gemfile}}

    - run: bundle exec rspec spec

Remove truffleruby since fails sometimes
Remove truffleruby since fails sometimes