name: CI

on: [push, pull_request]

jobs:
  Rspec:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        ruby-version:
          - 2.7
        alchemy:
          - 5.3-stable
          - 6.0-stable
          - main
        solidus:
          - v2.11
          - v3.0
        exclude:
          - alchemy: "5.3-stable"
            solidus: "v3.0"
            ruby-version: 2.7
    env:
      ALCHEMY_BRANCH: ${{ matrix.alchemy }}
      SOLIDUS_BRANCH: ${{ matrix.solidus }}
    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: Set up Node
        uses: actions/setup-node@v2
        with:
          node-version: 12
      - name: Run tests
        run: bundle exec rake

name: CI

on: [push, pull_request]

jobs:
  Rspec:
    runs-on: ubuntu-18.04
    strategy:
      fail-fast: false
      matrix:
        ruby-version:
          - 2.7
          - 3.0
        alchemy:
          - 5.3-stable
          - 6.0-stable
          - main
        solidus:
          - v2.11
          - v3.0
          - v3.1
        exclude:
          - alchemy: "5.3-stable"
            solidus: "v3.0"
            ruby-version: 2.7
          - alchemy: "5.3-stable"
            solidus: "v3.1"
            ruby-version: 2.7
          - alchemy: "5.3-stable"
            solidus: "v3.0"
            ruby-version: 3.0
          - alchemy: "5.3-stable"
            solidus: "v3.1"
            ruby-version: 3.0
          - alchemy: "5.3-stable"
            solidus: "v2.11"
            ruby-version: 3.0
          - alchemy: "6.0-stable"
            solidus: "v2.11"
            ruby-version: 3.0
          - alchemy: "main"
            solidus: "v2.11"
            ruby-version: 3.0
    env:
      ALCHEMY_BRANCH: ${{ matrix.alchemy }}
      SOLIDUS_BRANCH: ${{ matrix.solidus }}
    steps:
      - uses: actions/checkout@v2
      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby-version }}
          bundler-cache: true
      - name: Set up Node
        uses: actions/setup-node@v2
        with:
          node-version: 14
      - name: Run tests
        run: bundle exec rake

Add Solidus 3.1 and Ruby 3.0 to build matrix.
Add Solidus 3.1 and Ruby 3.0 to build matrix.

Solidus 2.11 is not compatible with Ruby 3.0, so we
skip the build.
