name: Test

on:
  - push
  - pull_request

jobs:
  test:
    name: >-
      ${{ matrix.os }} ${{ matrix.ruby }}
    runs-on: ${{ matrix.os }}-latest
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu
          - macos
          - windows
        ruby:
          - "2.5"
          - "2.6"
          - "2.7"
          - "3.0"
          - head
        include:
          - { os: windows , ruby: mingw }
          - { os: windows , ruby: mswin }
        exclude:
          - { os: windows , ruby: head }
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
      - run: bundle install
      - run: rake
