name: Ruby

on:
  push:
    branches:
      - master

  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby:
          - 2.5
          - 2.6
          - 2.7
          - 3.0
          - 3.1
          - jruby
        active_model:
          - 4.2
          - 5.2
          - 6.0
          - 6.1
          - 7.0
        exclude:
          - ruby: 2.5
            active_model: 7.0
          - ruby: 2.6
            active_model: 7.0
          - ruby: 2.7
            active_model: 4.2
          - ruby: 3.0
            active_model: 4.2
          - ruby: 3.0
            active_model: 5.2
          - ruby: 3.1
            active_model: 4.2
          - ruby: 3.1
            active_model: 5.2
          - ruby: jruby
            active_model: 7.0

    env:
      ACTIVE_MODEL_VERSION: "~> ${{ matrix.active_model }}.0"

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run the default task
        run: bundle exec rake

name: Ruby

on:
  push:
    branches:
      - master

  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        ruby:
          - 2.5
          - 2.6
          - 2.7
          - '3.0'
          - 3.1
          - jruby
        active_model:
          - 4.2
          - 5.2
          - '6.0'
          - 6.1
          - '7.0'
        exclude:
          - ruby: 2.5
            active_model: '7.0'
          - ruby: 2.6
            active_model: '7.0'
          - ruby: 2.7
            active_model: 4.2
          - ruby: '3.0'
            active_model: 4.2
          - ruby: '3.0'
            active_model: 5.2
          - ruby: 3.1
            active_model: 4.2
          - ruby: 3.1
            active_model: 5.2
          - ruby: jruby
            active_model: '7.0'

    env:
      ACTIVE_MODEL_VERSION: "~> ${{ matrix.active_model }}.0"

    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - name: Run the default task
        run: bundle exec rake

Fix truncation issue in CI configuration entries
Fix truncation issue in CI configuration entries

Zero terminated float values in GitHub Actions CI configurations are truncated, leading to unexpected behavior.  In this instance this results loading an unexpected Ruby or ActiveModel version for several CI matrix entries.

Specifically, the unquoted '3.0' is interpreted as '3', and the latest Ruby 3 version - at this time of writing 3.1.1 - is loaded.  To ensure that a 3.0.x version is loaded, we need to add quotes.

In the ActiveModel case, use of an unquoted '6.0' is interpreted as '6' and ActiveModel 6.1.4.6 is loaded at this time.  To ensure a 6.0.x version is loaded, we need to add quotes.

The unquoted '7.0' would have similar problems if and when a Rails 7.1.x is released..
