Skip to content

Add Ruby 3.2 to the CI matrix #2648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
matrix:
include:
# Edge Rails (7.1) builds >= 2.7
- ruby: 3.2
allow_failure: true
env:
RAILS_VERSION: 'main'
- ruby: 3.1
allow_failure: true
env:
Expand All @@ -47,6 +51,9 @@ jobs:
RAILS_VERSION: 'main'

# Rails 7.0 builds >= 2.7
- ruby: 3.2
env:
RAILS_VERSION: '~> 7.0.0'
- ruby: 3.1
env:
RAILS_VERSION: '~> 7.0.0'
Expand Down
8 changes: 8 additions & 0 deletions script/predicate_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ function is_mri_2plus {
fi
}

function is_ruby_26_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.6)"; then
return 0
else
return 1
fi
}

function is_ruby_23_plus {
if ruby -e "exit(RUBY_VERSION.to_f >= 2.3)"; then
return 0
Expand Down
6 changes: 5 additions & 1 deletion script/update_rubygems_and_install_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
set -e
source script/functions.sh

if is_ruby_23_plus; then
if is_ruby_26_plus; then
gem update --no-document --system
gem install --no-document bundler
elif is_ruby_23_plus; then
echo "Warning installing older versions of Rubygems / Bundler"
gem update --system '3.3.26'
gem install bundler -v '2.3.26'
else
echo "Warning installing older versions of Rubygems / Bundler"
gem update --system '2.7.10'
Expand Down