name: Test

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - "*"
  # Enable triggering CI runs manually.
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - '2.7'
          - '3.1'
        env:
          - ACTION_MAILER_VERSION=5
          - ACTION_MAILER_VERSION=6
          - ACTION_MAILER_VERSION=7
        experimental:
          - false
        exclude:
          - ruby: '3.1'
            env: ACTION_MAILER_VERSION=5
        include:
          - ruby: head
            env: ACTION_MAILER_VERSION=head
            experimental: true
    steps:
      - uses: actions/checkout@v3

      - name: Set env vars
        run: echo "${{ matrix.env }}" >> $GITHUB_ENV

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - run: bundle exec rake

name: Test

on:
  push:
    branches:
      - "*"
  pull_request:
    branches:
      - "*"
  # Enable triggering CI runs manually.
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}
    strategy:
      fail-fast: false
      matrix:
        ruby:
          - '2.7'
          - '3.1'
        action_mailer_version:
          - 5
          - 6
          - 7
        experimental:
          - false
        exclude:
          - ruby: '3.1'
            action_mailer_version: 5
        include:
          - ruby: head
            action_mailer_version: head
            experimental: true
    steps:
      - uses: actions/checkout@v3

      - name: Set env vars
        run: |
          echo "ACTION_MAILER_VERSION=${{ matrix.action_mailer_version }}" >> $GITHUB_ENV

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ matrix.ruby }}
          bundler-cache: true
      - run: bundle exec rake

Improve env vars in action
Improve env vars in action
