Skip to content
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

CI fix: Rails40 and Rails41 #2018

Merged
merged 11 commits into from
May 17, 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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
}

- if: matrix.ruby-version == '2.4.10'
name: Prepare mysql dirextory
name: Prepare mysql directory
run: sudo chown -R $USER /usr/local

- if: matrix.ruby-version == '2.4.10'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:
}

- if: matrix.ruby-version == '2.4.10' || matrix.ruby-version == '2.5.9' || matrix.ruby-version == '2.6.10'
name: Prepare mysql dirextory
name: Prepare mysql directory
run: sudo chown -R $USER /usr/local

- if: matrix.ruby-version == '2.4.10' || matrix.ruby-version == '2.5.9' || matrix.ruby-version == '2.6.10'
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/scripts/setup_bundler
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ function install_desired_bundler_version {
gem list bundler
}

function configure_bundler {
if ! [[ $RUBY_VERSION =~ 2.4 ]]; then
echo "DEBUG: Ruby is not at version 2.4.x, skipping 'bundler config'"
return
fi

# add mysql specific config for bundler when we are using older mysql
echo "DEBUG: running 'bundle config'"
bundle config --global build.mysql2 --with-mysql-config=/usr/local/mysql55/bin/mysql_config
}

function install_ruby_version_specific_gems {
if using_jruby; then
echo "DEBUG: Skipping specific gem installation, as JRuby is in use"
Expand Down Expand Up @@ -90,6 +101,7 @@ function set_up_bundler {

update_to_desired_rubygems_version
install_desired_bundler_version
configure_bundler
}

echo "DEBUG: setting up Bundler"
Expand Down
2 changes: 1 addition & 1 deletion test/environments/rails40/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

gem 'rake', '~> 12.3.3'
gem 'rake', '10.0.4'
gem 'rails', '~> 4.0.0'

gem 'minitest', '4.7.5', require: false # Minitest ~> 4.2 required for Rails 3.2
Expand Down
2 changes: 1 addition & 1 deletion test/environments/rails41/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

gem 'rake', '~> 12.3.3'
gem 'rake', '10.0.4'
gem 'rails', '~> 4.1.0'

gem 'minitest', '5.2.3'
Expand Down