name: ruby-prof

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

jobs:
  tests:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
        ruby: ['3.2', '3.3', '3.4', '4.0']
        include:
          - { os: windows-latest , ruby: mswin }
    runs-on: ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v3
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
        bundler-cache: true # runs 'bundle install' and caches installed gems automatically
    - name: Build
      run: bundle exec rake compile
    - name: Test
      run: bundle exec rake test
      env:
        GITHUB_ACTIONS: true
        TESTOPTS: "-v"
