Skip to content

Commit 41d075d

Browse files
Add Rails 7 and Ruby 3.1 to CI matrix
1 parent a069f57 commit 41d075d

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

.github/workflows/ruby.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
runs-on: ubuntu-latest
2020
strategy:
2121
matrix:
22-
ruby-version: ['2.6', '2.7', '3.0']
22+
ruby-version: ['2.6', '2.7', '3.0', '3.1']
2323
mongodb-version: ['4.4']
2424
sqlite-version: ['3.0']
2525

Rakefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ task :prepare_test_env do
3535
end
3636

3737
def run_with_gemfile(gemfile)
38-
Bundler.with_clean_env do
38+
Bundler.with_original_env do
3939
begin
4040
sh "BUNDLE_GEMFILE='#{gemfile}' bundle install --quiet"
4141
Rake.application['app:db:create'].invoke
@@ -62,6 +62,12 @@ namespace :spec do
6262
next if framework == 'mongoid' || (framework == 'rails' && version == "5")
6363
end
6464

65+
# Skip Rails 7 unless the Ruby version is at least 2.7
66+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7')
67+
next if framework == 'rails' && version == "7"
68+
end
69+
70+
6571
frameworks_versions[framework] ||= []
6672
frameworks_versions[framework] << file_name
6773

gemfiles/rails7.0.gemfile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
source 'https://rubygems.org'
2+
3+
gem 'rails', '~> 7.0.0'
4+
gem 'sprockets-rails'
5+
gem 'i18n', '~> 1.6'
6+
7+
platforms :jruby do
8+
gem "activerecord-jdbc-adapter"
9+
gem "activerecord-jdbcsqlite3-adapter"
10+
gem "jruby-openssl"
11+
end
12+
13+
platforms :ruby do
14+
gem "sqlite3", "~> 1.4"
15+
end
16+
17+
gemspec path: '../'

0 commit comments

Comments
 (0)