name: Unit tests

on:
  - pull_request
  - push

jobs:
  unit:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby:
          - "2.4"
          - "2.5"
          - "2.6"
          - "2.7"
    name: Ruby ${{ matrix.ruby }}
    steps:
      - uses: actions/checkout@v2
      - name: Setup ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-${{ matrix.ruby }}-gems-
      - name: Install dependencies
        run: |
          gem install bundler
          bundle config path vendor/bundle
          bundle install --jobs $(nproc) --retry 3
      - name: Run tests
        run: bundle exec rake

Add Github actions for CI
Add Github actions for CI
