name: Ruby

on:
  push:
  schedule:
  - cron:  '0 0 1 * *' # at 00:00 on the 1st of every month

jobs:
  test:
    name: '${{ matrix.os }}: ${{ matrix.ruby }}'
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest ]
        ruby: [ 2.4, 2.5, 2.6, 2.7, ruby-head, jruby, truffleruby ]
        exclude:
          - os: windows-latest
            ruby: truffleruby
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby ${{ matrix.ruby }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - run: ruby -v
    - run: bundle install --jobs 4 --retry 3
    - run: bundle exec rake spec

  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - run: ruby -v
    - run: bundle install --jobs 4 --retry 3
    - run: bundle exec rake rubocop

  install:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - run: ruby -v
    - run: gem build dyno_metadata
    - run: gem install *.gem

name: Ruby

on:
  push:
  schedule:
  - cron:  '0 0 1 * *' # at 00:00 on the 1st of every month

jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest ]
        ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', ruby-head, jruby, truffleruby ]
        exclude:
          - os: windows-latest
            ruby: truffleruby
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby ${{ matrix.ruby }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - run: ruby -v
    - run: bundle install --jobs 4 --retry 3
    - run: bundle exec rake spec

  lint:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - run: ruby -v
    - run: bundle install --jobs 4 --retry 3
    - run: bundle exec rake rubocop

  install:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7
    - run: ruby -v
    - run: gem build dyno_metadata
    - run: gem install *.gem

Add Ruby 3.0 to test matrix
Add Ruby 3.0 to test matrix

Let Actions name the jobs automatically using the test matrix.