---
name: test
on: [push, pull_request]
jobs:
  test:
    if: github.ref != 'refs/heads/master' 
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        ruby_version:
          - 2.6
        ar_version:
          - 5.2
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby_version }}
    - name: Setup
      env:
        AR_VERSION: ${{ matrix.ar_version}}
      run: bundle install
    - name: script
      run: |-
        set -e
        bundle exec rspec

  matrix-test:
    if: github.ref == 'refs/heads/master' 
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        ruby_version:
          - 2.5
          - 2.6
          - 2.7
        ar_version:
          - 4.2
          - 5.2
          - 6.0
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby_version }}
    - name: Setup
      env:
        AR_VERSION: ${{ matrix.ar_version}}
      run: bundle install
    - name: script
      run: |-
        set -e
        bundle exec rspec

---
name: test
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-18.04
    strategy:
      matrix:
        ruby_version:
          - 2.5
          - 2.6
          - 2.7
        ar_version:
          - 4.2
          - 5.2
          - 6.0
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby_version }}
    - name: Setup
      env:
        AR_VERSION: ${{ matrix.ar_version}}
      run: bundle install
    - name: script
      run: |-
        set -e
        bundle exec rspec

Test with matrix every time
Test with matrix every time
