name: CI

on: push

jobs:
  specs:
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:5.7
        ports:
          - 3306:3306
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
        options: >-
          --health-cmd "mysqladmin ping -h localhost"
          --health-interval 5s
          --health-timeout 3s

    strategy:
      matrix:
        ruby-version:
          - 2.4
          - 2.5
          - 2.6
          - 2.7
        gemfile:
          - rails4.2
          - rails5.0
          - rails5.1
          - rails5.2
          - rails6.0
          - rails6.1
        exclude:
          - ruby-version: 2.4
            gemfile: rails6.0
          - ruby-version: 2.4
            gemfile: rails6.1
          - ruby-version: 2.7
            gemfile: rails4.2
    env:
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
    steps:
      - uses: zendesk/checkout@v2
      - name: Set up Ruby
        uses: zendesk/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: RSpec
        run: bundle exec rspec

name: CI

on: push

jobs:
  specs:
    runs-on: ubuntu-latest

    services:
      mysql:
        image: mysql:5.7
        ports:
          - 3306:3306
        env:
          MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
        options: >-
          --health-cmd "mysqladmin ping -h localhost"
          --health-interval 5s
          --health-timeout 3s

    strategy:
      fail-fast: false
      matrix:
        ruby-version:
          - 2.4
          - 2.5
          - 2.6
          - 2.7
        gemfile:
          - rails4.2
          - rails5.0
          - rails5.1
          - rails5.2
          - rails6.0
          - rails6.1
        exclude:
          - ruby-version: 2.4
            gemfile: rails6.0
          - ruby-version: 2.4
            gemfile: rails6.1
          - ruby-version: 2.7
            gemfile: rails4.2
    env:
      BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
    steps:
      - uses: zendesk/checkout@v2
      - name: Set up Ruby
        uses: zendesk/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: RSpec
        run: bundle exec rspec

Fix CI, remove fail-fast default.
Fix CI, remove fail-fast default.
