name: RSpec tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  ruby:
    runs-on: ubuntu-latest
    timeout-minutes: 5
    strategy:
      fail-fast: false
      matrix:
       include:
         - docker-image: 'library/ruby:2.5'
         - docker-image: 'library/ruby:2.6'
         - docker-image: 'library/ruby:2.7'
         - docker-image: 'library/ruby:3.0'
         - docker-image: 'flavorjones/truffleruby:stable'
         - docker-image: 'bitnami/jruby:latest'
    container: ${{ matrix.docker-image }}
    steps:
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: bundle install
    - name: Run tests
      run: bundle exec rake spec
  actionmailer:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3
        bundler-cache: true
    - name: Setup mail with ActionMailer edge
      run: |
        git clone --depth=1 https://github.com/rails/rails.git -b main
        cd rails
        echo -e "\ngem 'mail', path: '../'" >> Gemfile
        bundle update --bundler --source mail
    - name: Run ActionMailer tests
      run: |
        cd rails/actionmailer
        bundle exec rake

name: RSpec tests

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  ruby:
    name: ${{ matrix.docker-image }} (timeout ${{ matrix.timeout }})
    runs-on: ubuntu-latest
    timeout-minutes: ${{ matrix.timeout }}
    strategy:
      fail-fast: false
      matrix:
       include:
         - docker-image: 'library/ruby:2.5'
           timeout: 5
         - docker-image: 'library/ruby:2.6'
           timeout: 5
         - docker-image: 'library/ruby:2.7'
           timeout: 5
         - docker-image: 'library/ruby:3.0'
           timeout: 5
         - docker-image: 'flavorjones/truffleruby:stable'
           timeout: 50
         - docker-image: 'bitnami/jruby:latest'
           timeout: 5
    container: ${{ matrix.docker-image }}
    steps:
    - uses: actions/checkout@v2
    - name: Install dependencies
      run: bundle install
    - name: Run tests
      run: bundle exec rake spec
  actionmailer:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3
        bundler-cache: true
    - name: Setup mail with ActionMailer edge
      run: |
        git clone --depth=1 https://github.com/rails/rails.git -b main
        cd rails
        echo -e "\ngem 'mail', path: '../'" >> Gemfile
        bundle update --bundler --source mail
    - name: Run ActionMailer tests
      run: |
        cd rails/actionmailer
        bundle exec rake

Use longer timeout on TruffleRuby
Use longer timeout on TruffleRuby

So that it doesn't timeout but fails in a standard way.
