Skip to content

Commit 5696dec

Browse files
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]>
2 parents e331590 + 27762f2 commit 5696dec

File tree

7 files changed

+28
-18
lines changed

7 files changed

+28
-18
lines changed

.github/workflows/tests.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
ruby-version: ["3.0", "3.1", "3.2"]
21+
ruby-version: ["3.2", "3.3", "3.4"]
2222
rails-version: [6.1, 7.0]
2323
env:
2424
RAILS_VERSION: ${{ matrix.rails-version }}
2525
name: integration-tests (Rails ${{ matrix.rails-version }} with Ruby ${{ matrix.ruby-version }})
2626
steps:
2727
- uses: actions/checkout@v4
28+
- name: Install SQLite dependencies
29+
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
2830
- name: Set up Ruby
2931
uses: ruby/setup-ruby@v1
3032
with:
@@ -36,7 +38,7 @@ jobs:
3638
run: bundle exec rspec
3739
- name: Upload coverage reports to Codecov
3840
uses: codecov/codecov-action@v5
39-
if: matrix.ruby-version == '3.1' && matrix.rails-version == '7.0'
41+
if: matrix.ruby-version == '3.4' && matrix.rails-version == '7.0'
4042
with:
4143
token: ${{ secrets.CODECOV_TOKEN }}
4244

@@ -45,12 +47,14 @@ jobs:
4547
runs-on: ubuntu-latest
4648
steps:
4749
- uses: actions/checkout@v4
50+
- name: Install SQLite dependencies
51+
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
4852
- name: Set up Ruby
4953
uses: ruby/setup-ruby@v1
5054
env:
5155
BUNDLE_WITH: test
5256
with:
53-
ruby-version: "3.0"
57+
ruby-version: "3.4"
5458
bundler-cache: true
5559
- name: Run linter
5660
run: bundle exec rubocop lib/ spec/
@@ -70,13 +74,15 @@ jobs:
7074
runs-on: ubuntu-latest
7175
steps:
7276
- uses: actions/checkout@v4
77+
- name: Install SQLite dependencies
78+
run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev
7379
- name: Set up Ruby
7480
uses: ruby/setup-ruby@v1
7581
env:
7682
BUNDLE_WITHOUT: test
7783
BUNDLE_GEMFILE: ./playground/Gemfile
7884
with:
79-
ruby-version: "3.0"
85+
ruby-version: "3.4"
8086
bundler-cache: true
8187
- name: Meilisearch (latest) setup with Docker
8288
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics

Gemfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ group :development do
1313
end
1414

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

1919
gem 'active_model_serializers'
2020
gem 'rails', "~> #{rails_version}"
2121
gem 'sequel', sequel_version
2222

23-
if Gem::Version.new(rails_version) >= Gem::Version.new('6.0')
24-
gem 'sqlite3', '~> 1.4.0', platform: %i[rbx ruby]
23+
# remove when deprecate rails 6
24+
if Gem::Version.new(rails_version) >= Gem::Version.new('7.0')
25+
gem 'sqlite3', '~> 2', platform: %i[rbx ruby]
2526
else
26-
gem 'sqlite3', '< 1.4.0', platform: %i[rbx ruby]
27+
gem 'sqlite3', '< 2', platform: %i[rbx ruby]
2728
end
2829

2930
gem 'activerecord-jdbc-adapter', platform: :jruby
@@ -33,6 +34,7 @@ group :test do
3334
gem 'simplecov', require: 'false'
3435
gem 'simplecov-cobertura', require: 'false'
3536
gem 'threads'
37+
gem 'logger'
3638

3739
gem 'byebug'
3840
gem 'dotenv', '~> 2.7', '>= 2.7.6'

bors.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
status = [
22
'integration-tests (Rails 6.1 with Ruby 3.2)',
3-
'integration-tests (Rails 6.1 with Ruby 3.1)',
4-
'integration-tests (Rails 6.1 with Ruby 3.0)',
5-
'integration-tests (Rails 7 with Ruby 3.0)',
6-
'integration-tests (Rails 7 with Ruby 3.1)',
3+
'integration-tests (Rails 6.1 with Ruby 3.3)',
4+
'integration-tests (Rails 6.1 with Ruby 3.4)',
75
'integration-tests (Rails 7 with Ruby 3.2)',
6+
'integration-tests (Rails 7 with Ruby 3.3)',
7+
'integration-tests (Rails 7 with Ruby 3.4)',
88
'linter-check',
99
'smoke-test',
1010
]

meilisearch-rails.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ Gem::Specification.new do |s|
3535
s.required_ruby_version = '>= 3.0.0'
3636

3737
s.add_dependency 'meilisearch', '~> 0.28'
38+
s.add_dependency 'mutex_m', '~> 0.2'
3839
end

playground/Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.1.2-slim
1+
FROM ruby:3.4-slim
22
ENV LANG C.UTF-8
33

44
RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
@@ -9,7 +9,8 @@ RUN apt-get update -qq && apt-get install -yq --no-install-recommends \
99
telnet \
1010
nodejs \
1111
npm \
12-
python \
12+
python3 \
13+
libsqlite3-dev \
1314
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
1415

1516
RUN apt-get update -qq && apt-get install -y libpq-dev

playground/Gemfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ source 'https://rubygems.org'
22
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
33

44
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
5-
gem 'rails', '~> 6.1.3'
5+
gem 'rails', '~> 7.1'
66
# Use sqlite3 as the database for Active Record
7-
gem 'sqlite3', '~> 1.4'
7+
gem 'sqlite3'
88
# Use Puma as the app server
9-
gem 'puma', '~> 5.0'
9+
gem 'puma'
1010
# Use SCSS for stylesheets
1111
gem 'sass-rails', '>= 6'
1212
gem 'bootstrap', '~> 5.0.0.beta2'

playground/config/application.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
module Playground
1010
class Application < Rails::Application
1111
# Initialize configuration defaults for originally generated Rails version.
12-
config.load_defaults 6.1
12+
config.load_defaults 7.1
1313

1414
# Configuration for the application, engines, and railties goes here.
1515
#

0 commit comments

Comments
 (0)