Skip to content

Commit 60e0453

Browse files
committed
Add CI for Rails 7.2
Additionally, add an exclude for main since it bumped the ruby version
1 parent e9548a3 commit 60e0453

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

Diff for: .github/workflows/ci.yml

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,18 @@ jobs:
77
fail-fast: false
88
matrix:
99
ruby: [ '2.7', '3.0', '3.1', '3.2', '3.3', 'head', 'truffleruby' ]
10-
rails: [ '6.1', '7.0', '7.1', 'main' ]
10+
rails: [ '6.1', '7.0', '7.1', '7.2', 'main' ]
1111
exclude:
12+
- ruby: '2.7'
13+
rails: '7.2'
14+
- ruby: '3.0'
15+
rails: '7.2'
1216
- ruby: '2.7'
1317
rails: 'main'
1418
- ruby: '3.0'
1519
rails: 'main'
20+
- ruby: '3.1'
21+
rails: 'main'
1622

1723
env:
1824
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/rails_${{ matrix.rails }}.gemfile

Diff for: gemfiles/rails_7.2.gemfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
source "https://rubygems.org"
2+
3+
gem "activemodel", "~> 7.2.0"
4+
gem "railties", "~> 7.2.0"
5+
6+
gemspec path: "../"

Diff for: test/cases/railtie_test.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,23 @@ class Application < Rails::Application; end
99

1010
class RailtieTest < ActiveSupport::TestCase
1111
include ActiveSupport::Testing::Isolation
12+
# Not every Rails version introduces a new version
13+
KNOWN_CACHE_FORMATS = {
14+
6.1 => 6.1,
15+
7.0 => 7.0,
16+
7.1 => 7.1,
17+
7.2 => 7.1,
18+
8.0 => 7.1,
19+
}
20+
KNOWN_CACHE_FORMATS.default = 7.1
1221

1322
def setup
1423
Rails.env = 'development'
1524
@app = BlogApp::Application.new
1625
@app.config.eager_load = false
1726
@app.config.logger = Logger.new(nil)
1827
@app.config.secret_key_base = ('x' * 30)
19-
@app.config.active_support.cache_format_version = Rails::VERSION::STRING.to_f
28+
@app.config.active_support.cache_format_version = KNOWN_CACHE_FORMATS[Rails::VERSION::STRING.to_f]
2029
end
2130

2231
test 'GlobalID.app for Blog::Application defaults to blog' do

0 commit comments

Comments
 (0)