diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c1df4be6..10600837 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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: @@ -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 }} @@ -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/ @@ -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 diff --git a/Gemfile b/Gemfile index 8f4e5c69..d0188678 100644 --- a/Gemfile +++ b/Gemfile @@ -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 @@ -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' diff --git a/bors.toml b/bors.toml index 2f2206c1..d2850049 100644 --- a/bors.toml +++ b/bors.toml @@ -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', ] diff --git a/meilisearch-rails.gemspec b/meilisearch-rails.gemspec index b3f47801..26b7da06 100644 --- a/meilisearch-rails.gemspec +++ b/meilisearch-rails.gemspec @@ -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 diff --git a/playground/Dockerfile b/playground/Dockerfile index 9d347cc5..a829060e 100644 --- a/playground/Dockerfile +++ b/playground/Dockerfile @@ -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 \ @@ -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 diff --git a/playground/Gemfile b/playground/Gemfile index 20211bf2..b5f5fc44 100644 --- a/playground/Gemfile +++ b/playground/Gemfile @@ -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' diff --git a/playground/config/application.rb b/playground/config/application.rb index 6b93017d..468842d5 100644 --- a/playground/config/application.rb +++ b/playground/config/application.rb @@ -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. #