name: Test Rails
defaults:
  run:
    working-directory: judoscale-rails
on:
  push:
    branches:
      - main
  pull_request:
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        gemfile:
          - Gemfile
        ruby:
          - '2.6'
          - '2.7'
          - '3.0'
    runs-on: ubuntu-latest
    env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
      BUNDLE_GEMFILE: ${{ github.workspace }}/judoscale-rails/${{ matrix.gemfile }}
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs bundle install and caches installed gems automatically
      - run: bundle exec rake
  lint:
    strategy:
      fail-fast: false
      matrix:
        gemfile:
          - Gemfile
        ruby:
          - '3.0'
    runs-on: ubuntu-latest
    env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
      BUNDLE_GEMFILE: ${{ github.workspace }}/judoscale-rails/${{ matrix.gemfile }}
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs bundle install and caches installed gems automatically
      - run: bundle exec standardrb

name: Test Rails
defaults:
  run:
    working-directory: judoscale-rails
on:
  push:
    branches:
      - main
  pull_request:
jobs:
  test:
    strategy:
      fail-fast: false
      matrix:
        gemfile:
          - Gemfile
        ruby:
          # - '2.6'
          - '2.7'
          - '3.0'
    runs-on: ubuntu-latest
    env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
      BUNDLE_GEMFILE: ${{ github.workspace }}/judoscale-rails/${{ matrix.gemfile }}
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs bundle install and caches installed gems automatically
      - run: bundle exec rake
  lint:
    strategy:
      fail-fast: false
      matrix:
        gemfile:
          - Gemfile
        ruby:
          - '3.0'
    runs-on: ubuntu-latest
    env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
      BUNDLE_GEMFILE: ${{ github.workspace }}/judoscale-rails/${{ matrix.gemfile }}
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true # runs bundle install and caches installed gems automatically
      - run: bundle exec standardrb

Disable Ruby 2.6 on the Rails lib for now
Disable Ruby 2.6 on the Rails lib for now

Ruby 2.6 doesn't work with Rails 7, so the build fails with that
combination.

The Ruby lib was using Rails 6.1 due to other constraints, so it works
there, but not here if we allow installing/running against Rails 7.

Later I want to run the tests against different versions of Rails, but
this will do for now to get a green build.
