Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: update build matrix - Ruby 3.3 & Rails 7.1 #1204

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 36 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,62 +8,83 @@ on:

jobs:
test:
runs-on: ubuntu-latest
name: Test (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails_version }})
runs-on: ubuntu-${{ matrix.ubuntu }}
strategy:
fail-fast: false
matrix:
ruby: ['2.7', '3.0', '3.1', '3.2', jruby-head, ruby-head]
ruby: ['3.1', '3.2', '3.3', jruby-head, ruby-head]
rails_version:
- '6.0.0'
- '6.1.0'
- '7.0.0'
- '7.1.0'
- 'edge'
ubuntu: [latest]
include:
# Rails 5.2
# Ruby 2.6
- ruby: 2.6
rails_version: '5.2.0'
rails_version: '6.1.0'
ubuntu: '20.04'

# Ruby 2.7
- ruby: 2.7
rails_version: '5.2.0'
- ruby: jruby-9.2
rails_version: '5.2.0'
rails_version: '6.1.0'
ubuntu: '20.04'
- ruby: 2.7
rails_version: '7.0.0'
ubuntu: '20.04'

# Ruby 2.6
- ruby: 2.6
rails_version: '6.0.0'
- ruby: 2.6
# Ruby 3.0
- ruby: '3.0'
rails_version: '6.1.0'
ubuntu: '22.04'
- ruby: '3.0'
rails_version: '7.0.0'
ubuntu: '22.04'

# jruby-9.2
- ruby: jruby-9.2
rails_version: '6.0.0'
ubuntu: '20.04'
- ruby: jruby-9.2
rails_version: '6.1.0'
ubuntu: '20.04'

# jruby-9.4
- ruby: jruby-9.4
rails_version: '7.0.0'
- ruby: jruby-9.4
rails_version: 'edge'
ubuntu: '22.04'

#
# The past
#
# EOL Active Record
- ruby: 2.2
rails_version: '3.2.0'
ubuntu: '20.04'
- ruby: 2.1
rails_version: '4.1.0'
ubuntu: '20.04'
- ruby: 2.4
rails_version: '4.2.0'
ubuntu: '20.04'
- ruby: 2.4
rails_version: '5.0.0'
ubuntu: '20.04'
- ruby: 2.5
rails_version: '5.1.0'
ubuntu: '20.04'
- ruby: 2.6
rails_version: '5.2.0'
ubuntu: '20.04'
- ruby: 2.7
rails_version: '6.0.0'
ubuntu: '20.04'

continue-on-error: ${{ matrix.rails_version == 'edge' || endsWith(matrix.ruby, 'head') }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
env:
RAILS_VERSION: ${{ matrix.rails_version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
Expand Down
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ group :test do
if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] >= '6.0.0'
gem 'zeitwerk', :require => false
end
gem 'loofah', '< 2.21.0', :require => false if RUBY_VERSION < '2.6'

# TODO: remove these requires once activesupport has such dependencies
# in all versions of Rails we test against on Ruby >=3.4 (and head).
if RUBY_VERSION >= '3.4'
gem 'base64', :require => false
gem 'bigdecimal', :require => false
gem 'mutex_m', :require => false
end
end

group :rubocop do
Expand Down
2 changes: 1 addition & 1 deletion lib/delayed/backend/shared_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ def create_job(opts = {})
worker.work_off
@job.reload
expect(@job.last_error).to match(/did not work/)
expect(@job.last_error).to match(/sample_jobs.rb:\d+:in `perform'/)
expect(@job.last_error).to match(/sample_jobs.rb:\d+:in [`'](ErrorJob#)?perform'/)
expect(@job.attempts).to eq(1)
expect(@job.run_at).to be > Delayed::Job.db_time_now - 10.minutes
expect(@job.run_at).to be < Delayed::Job.db_time_now + 10.minutes
Expand Down
Loading