name: rqrcode

on:
  push:
    branches:
    - master
  pull_request:
    branches:
    - master

jobs:
  Build:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
        ruby: ['2.6', '2.7', '3.0', '3.1', '3.2']
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v3
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true # runs 'bundle install' and caches installed gems automatically
    - name: Run Tests for Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
      run: bundle exec rake spec
    - name: StandardRB check for Ruby ${{ matrix.ruby }} on ${{ matrix.os }}
      run: bundle exec standardrb --format progress
