name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby:
          - '2.5.x'
          - '2.6.x'
        rails:
          - 'rails_v5.1.x'
          - 'rails_v5.2.x'
          - 'rails_v6.0.x'
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Setup System
        run: |
          sudo apt-get install libsqlite3-dev
      - name: Setup Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Bundle
        env:
          MTSR_RAILS_VERSION: ${{ matrix.rails }}
        run: |
          export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
          gem uninstall -aIx bundler
          gem install bundler -v 1.17.3
          bundle install --jobs 4 --retry 3
      - name: Test
        run: |
          export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
          bundle exec rake

name: CI
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby:
          - '2.5.x'
          - '2.6.x'
        rails:
          - 'rails_v5.1.x'
          - 'rails_v5.2.x'
          - 'rails_v6.0.x'
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Setup System
        run: |
          sudo apt-get install libsqlite3-dev
          echo "::set-env name=MTSR_RAILS_VERSION::${{ matrix.rails }}"
      - name: Setup Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - name: Bundle
        run: |
          export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
          gem uninstall -aIx bundler
          gem install bundler -v 1.17.3
          bundle install --jobs 4 --retry 3
      - name: Test
        run: |
          export BUNDLE_GEMFILE="${GITHUB_WORKSPACE}/gemfiles/${MTSR_RAILS_VERSION}.gemfile"
          bundle exec rake

Set MTSR_RAILS_VERSION for all steps.
Set MTSR_RAILS_VERSION for all steps.
