Skip to content

Commit

Permalink
Add Rails 7.2 to CI (#671)
Browse files Browse the repository at this point in the history
* Add Rails 7.2 to CI

* Fix CI
  • Loading branch information
santib authored Oct 15, 2024
1 parent 427fdfa commit 0d40ea6
Show file tree
Hide file tree
Showing 7 changed files with 91 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
gemfile:
- rack_3
- rack_2
- rails_7_2
- rails_7_1
- rails_7_0
- rails_6_1
Expand All @@ -38,6 +39,8 @@ jobs:
- redis_5
- redis_4
- connection_pool_dalli
- active_support_7_2_redis_cache_store
- active_support_7_2_redis_cache_store_pooled
- active_support_7_1_redis_cache_store
- active_support_7_1_redis_cache_store_pooled
- active_support_7_0_redis_cache_store
Expand Down Expand Up @@ -104,6 +107,30 @@ jobs:
ruby: '2.6'
- gemfile: active_support_7_1_redis_cache_store_pooled
ruby: '2.5'
- gemfile: rails_7_2
ruby: '3.0'
- gemfile: rails_7_2
ruby: '2.7'
- gemfile: rails_7_2
ruby: '2.6'
- gemfile: rails_7_2
ruby: '2.5'
- gemfile: active_support_7_2_redis_cache_store
ruby: '3.0'
- gemfile: active_support_7_2_redis_cache_store
ruby: '2.7'
- gemfile: active_support_7_2_redis_cache_store
ruby: '2.6'
- gemfile: active_support_7_2_redis_cache_store
ruby: '2.5'
- gemfile: active_support_7_2_redis_cache_store_pooled
ruby: '3.0'
- gemfile: active_support_7_2_redis_cache_store_pooled
ruby: '2.7'
- gemfile: active_support_7_2_redis_cache_store_pooled
ruby: '2.6'
- gemfile: active_support_7_2_redis_cache_store_pooled
ruby: '2.5'
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
Expand Down
15 changes: 15 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ appraise "rack_2" do
gem "rack", "~> 2.0"
end

appraise 'rails_7-2' do
gem 'railties', '~> 7.2.0'
end

appraise 'rails_7-1' do
gem 'railties', '~> 7.1.0'
end
Expand Down Expand Up @@ -49,6 +53,17 @@ appraise "connection_pool_dalli" do
gem "dalli", "~> 3.0"
end

appraise "active_support_7-2_redis_cache_store" do
gem "activesupport", "~> 7.2.0"
gem "redis", "~> 5.0"
end

appraise "active_support_7-2_redis_cache_store_pooled" do
gem "activesupport", "~> 7.2.0"
gem "connection_pool", "~> 2.2"
gem "redis", "~> 5.0"
end

appraise "active_support_7-1_redis_cache_store" do
gem "activesupport", "~> 7.1.0"
gem "redis", "~> 5.0"
Expand Down
13 changes: 13 additions & 0 deletions gemfiles/active_support_7_2_redis_cache_store.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "~> 7.2.0"
gem "redis", "~> 5.0"

group :maintenance, optional: true do
gem "bake"
gem "bake-gem"
end

gemspec path: "../"
14 changes: 14 additions & 0 deletions gemfiles/active_support_7_2_redis_cache_store_pooled.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "~> 7.2.0"
gem "connection_pool", "~> 2.2"
gem "redis", "~> 5.0"

group :maintenance, optional: true do
gem "bake"
gem "bake-gem"
end

gemspec path: "../"
12 changes: 12 additions & 0 deletions gemfiles/rails_7_2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "railties", "~> 7.2.0"

group :maintenance, optional: true do
gem "bake"
gem "bake-gem"
end

gemspec path: "../"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

describe "ActiveSupport::Cache::MemCacheStore (pooled) as a cache backend" do
before do
Rack::Attack.cache.store = ActiveSupport::Cache::MemCacheStore.new(pool_size: 2)
Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0")
ActiveSupport::Cache::MemCacheStore.new(pool: true)
else
ActiveSupport::Cache::MemCacheStore.new(pool_size: 2)
end
end

after do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@

describe "ActiveSupport::Cache::RedisCacheStore (pooled) as a cache backend" do
before do
Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2)
Rack::Attack.cache.store = if ActiveSupport.gem_version >= Gem::Version.new("7.2.0")
ActiveSupport::Cache::RedisCacheStore.new(pool: true)
else
ActiveSupport::Cache::RedisCacheStore.new(pool_size: 2)
end
end

after do
Expand Down

0 comments on commit 0d40ea6

Please sign in to comment.