name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby-version:
          - 2.5
          - 2.6
          - 2.7
          - "3.0"
          - head
        gemfile:
          - rails_6.0.gemfile
          - rails_6.1.gemfile

    env:
      BUNDLE_WITHOUT: vscode
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}

    continue-on-error: ${{ matrix.ruby-version == 'head' }}

    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: Run test
        run: bundle exec rake

  coverage:
    runs-on: ubuntu-latest
    env:
      BUNDLE_WITHOUT: vscode
      BUNDLE_GEMFILE: gemfile/rails_6.1.gemfile

    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.0"
          bundler-cache: true
      - name: Run test
        run: bundle exec rake
        env:
          CI: enabled
      - uses: paambaati/codeclimate-action@v2
        with:
          debug: true
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
name: CI

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby-version:
          - 2.5
          - 2.6
          - 2.7
          - "3.0"
          - head
        gemfile:
          - rails_6.0.gemfile
          - rails_6.1.gemfile

    env:
      BUNDLE_WITHOUT: vscode
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}

    continue-on-error: ${{ matrix.ruby-version == 'head' }}

    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: Run test
        run: bundle exec rake

  coverage:
    needs: [ test ]
    runs-on: ubuntu-latest
    env:
      BUNDLE_WITHOUT: vscode
      BUNDLE_GEMFILE: gemfile/rails_6.1.gemfile

    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: "3.0"
          bundler-cache: true
      - name: Run test
        run: bundle exec rake
        env:
          CI: enabled
      - uses: paambaati/codeclimate-action@v2
        with:
          debug: true
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Add dependency of coverage job
Add dependency of coverage job
