Skip to content

Commit 5fac874

Browse files
authored
Merge pull request #668 from petergoldstein/feature/add_rails_7_and_ruby_3_1
Add Rails 7 and Ruby 3.1 and 3.2 to the CI matrix.
2 parents a069f57 + 3acaf1b commit 5fac874

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/ruby.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ 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', '3.2']
2323
mongodb-version: ['4.4']
2424
sqlite-version: ['3.0']
2525

2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- name: Set up Ruby
2929
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
3030
# change this to (see https://github.com/ruby/setup-ruby#versioning):

Rakefile

Lines changed: 7 additions & 1 deletion
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

Lines changed: 17 additions & 0 deletions
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)