.github/workflows/rspec.yml

Summary

Maintainability
Test Coverage
name: RSpec

on:
  push:
    paths-ignore:
      - "**.md"
  pull_request:
    paths-ignore:
      - "**.md"

jobs:
  rspec:
    strategy:
      matrix:
        os: [ ubuntu-20.04, macos-10.15, windows-2019 ]
        ruby: [ 2.5, 2.6.6, 2.7 ]
    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true
    - name: Install dependencies
      run: bundle install
    - name: Prepare CodeClimate Reporter
      if: ${{ matrix.ruby == 2.7 && matrix.os == 'ubuntu-20.04' }}
      run: |
        curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
        chmod +x ./cc-test-reporter
        ./cc-test-reporter before-build
    - name: Run RSpec
      run: bundle exec rake
    - name: Upload CodeClimate coverage
      env:
        CC_TEST_REPORTER_ID: 35f13e7b216ab55da300d3b9f0dab60cfca0c5c21a287783464255b358e2d697
      if: ${{ matrix.ruby == 2.7 && matrix.os == 'ubuntu-20.04' }}
      run: ./cc-test-reporter after-build