Skip to content

Commit a0099fc

Browse files
authored
Add Ruby 3.2 to the CI matrix (#2648)
* Add Ruby 3.2 to the CI matrix * Change to install past Rubygems and Bundler if less than Ruby 2.6 https://github.com/rubygems/rubygems/releases/tag/bundler-v2.4.0 https://github.com/rubygems/rubygems/releases/tag/v3.4.0
1 parent c60ff79 commit a0099fc

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/ci.yml

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
matrix:
3434
include:
3535
# Edge Rails (7.1) builds >= 2.7
36+
- ruby: 3.2
37+
allow_failure: true
38+
env:
39+
RAILS_VERSION: 'main'
3640
- ruby: 3.1
3741
allow_failure: true
3842
env:
@@ -47,6 +51,9 @@ jobs:
4751
RAILS_VERSION: 'main'
4852

4953
# Rails 7.0 builds >= 2.7
54+
- ruby: 3.2
55+
env:
56+
RAILS_VERSION: '~> 7.0.0'
5057
- ruby: 3.1
5158
env:
5259
RAILS_VERSION: '~> 7.0.0'

script/predicate_functions.sh

+8
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@ function is_mri_2plus {
5757
fi
5858
}
5959

60+
function is_ruby_26_plus {
61+
if ruby -e "exit(RUBY_VERSION.to_f >= 2.6)"; then
62+
return 0
63+
else
64+
return 1
65+
fi
66+
}
67+
6068
function is_ruby_23_plus {
6169
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
6270
return 0

script/update_rubygems_and_install_bundler

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
set -e
66
source script/functions.sh
77

8-
if is_ruby_23_plus; then
8+
if is_ruby_26_plus; then
99
gem update --no-document --system
1010
gem install --no-document bundler
11+
elif is_ruby_23_plus; then
12+
echo "Warning installing older versions of Rubygems / Bundler"
13+
gem update --system '3.3.26'
14+
gem install bundler -v '2.3.26'
1115
else
1216
echo "Warning installing older versions of Rubygems / Bundler"
1317
gem update --system '2.7.10'

0 commit comments

Comments
 (0)