Skip to content

Commit

Permalink
Merge #378
Browse files Browse the repository at this point in the history
378: Fix CI for after ubuntu-latest becomes ubuntu-24 r=curquiza a=brunoocasali

We should be able to run the CI after this PR.

Deprecate ruby 3.0 and 3.1 officially from the CI and add support to ruby 3.4

Co-authored-by: Bruno Casali <[email protected]>
  • Loading branch information
meili-bors[bot] and brunoocasali authored Jan 6, 2025
2 parents e331590 + 27762f2 commit 5696dec
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ["3.0", "3.1", "3.2"]
ruby-version: ["3.2", "3.3", "3.4"]
rails-version: [6.1, 7.0]
env:
RAILS_VERSION: ${{ matrix.rails-version }}
name: integration-tests (Rails ${{ matrix.rails-version }} with Ruby ${{ matrix.ruby-version }})
steps:
- uses: actions/checkout@v4
- name: Install SQLite dependencies
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -36,7 +38,7 @@ jobs:
run: bundle exec rspec
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
if: matrix.ruby-version == '3.1' && matrix.rails-version == '7.0'
if: matrix.ruby-version == '3.4' && matrix.rails-version == '7.0'
with:
token: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -45,12 +47,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install SQLite dependencies
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
env:
BUNDLE_WITH: test
with:
ruby-version: "3.0"
ruby-version: "3.4"
bundler-cache: true
- name: Run linter
run: bundle exec rubocop lib/ spec/
Expand All @@ -70,13 +74,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install SQLite dependencies
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
env:
BUNDLE_WITHOUT: test
BUNDLE_GEMFILE: ./playground/Gemfile
with:
ruby-version: "3.0"
ruby-version: "3.4"
bundler-cache: true
- name: Meilisearch (latest) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
Expand Down
10 changes: 6 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ group :development do
end

group :test do
rails_version = ENV['RAILS_VERSION'] || '6.1'
rails_version = ENV['RAILS_VERSION'] || '7.1'
sequel_version = ENV['SEQUEL_VERSION'] ? "~> #{ENV['SEQUEL_VERSION']}" : '>= 4.0'

gem 'active_model_serializers'
gem 'rails', "~> #{rails_version}"
gem 'sequel', sequel_version

if Gem::Version.new(rails_version) >= Gem::Version.new('6.0')
gem 'sqlite3', '~> 1.4.0', platform: %i[rbx ruby]
# remove when deprecate rails 6
if Gem::Version.new(rails_version) >= Gem::Version.new('7.0')
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
else
gem 'sqlite3', '< 1.4.0', platform: %i[rbx ruby]
gem 'sqlite3', '< 2', platform: %i[rbx ruby]
end

gem 'activerecord-jdbc-adapter', platform: :jruby
Expand All @@ -33,6 +34,7 @@ group :test do
gem 'simplecov', require: 'false'
gem 'simplecov-cobertura', require: 'false'
gem 'threads'
gem 'logger'

gem 'byebug'
gem 'dotenv', '~> 2.7', '>= 2.7.6'
Expand Down
8 changes: 4 additions & 4 deletions bors.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
status = [
'integration-tests (Rails 6.1 with Ruby 3.2)',
'integration-tests (Rails 6.1 with Ruby 3.1)',
'integration-tests (Rails 6.1 with Ruby 3.0)',
'integration-tests (Rails 7 with Ruby 3.0)',
'integration-tests (Rails 7 with Ruby 3.1)',
'integration-tests (Rails 6.1 with Ruby 3.3)',
'integration-tests (Rails 6.1 with Ruby 3.4)',
'integration-tests (Rails 7 with Ruby 3.2)',
'integration-tests (Rails 7 with Ruby 3.3)',
'integration-tests (Rails 7 with Ruby 3.4)',
'linter-check',
'smoke-test',
]
Expand Down
1 change: 1 addition & 0 deletions meilisearch-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ Gem::Specification.new do |s|
s.required_ruby_version = '>= 3.0.0'

s.add_dependency 'meilisearch', '~> 0.28'
s.add_dependency 'mutex_m', '~> 0.2'
end
5 changes: 3 additions & 2 deletions playground/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:3.1.2-slim
FROM ruby:3.4-slim
ENV LANG C.UTF-8

RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
Expand All @@ -9,7 +9,8 @@ RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
telnet \
nodejs \
npm \
python \
python3 \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN apt-get update -qq && apt-get install -y libpq-dev
Expand Down
6 changes: 3 additions & 3 deletions playground/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
gem 'rails', '~> 6.1.3'
gem 'rails', '~> 7.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3', '~> 1.4'
gem 'sqlite3'
# Use Puma as the app server
gem 'puma', '~> 5.0'
gem 'puma'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
gem 'bootstrap', '~> 5.0.0.beta2'
Expand Down
2 changes: 1 addition & 1 deletion playground/config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
module Playground
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 6.1
config.load_defaults 7.1

# Configuration for the application, engines, and railties goes here.
#
Expand Down

0 comments on commit 5696dec

Please sign in to comment.