Skip to content

Commit

Permalink
Merge branch 'release/v5.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pat committed Dec 30, 2022
2 parents a55f678 + 76672a0 commit 2a67818
Show file tree
Hide file tree
Showing 29 changed files with 379 additions and 175 deletions.
125 changes: 3 additions & 122 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,111 +16,6 @@ workflows:
parameters:
database: [ 'mysql2', 'postgresql' ]
rails: [ '4_2', '5_0', '5_1', '5_2' ]
- test:
name: "Sphinx 3.4"
sphinx_version: 3.4.1
sphinx_engine: sphinx
debian: buster
matrix:
parameters:
database: [ 'mysql2' ]
ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ]
rails: [ '4_2', '5_0', '5_1', '5_2' ]
exclude:
- rails: '4_2'
ruby: '2.5.9'
- rails: '4_2'
ruby: '2.6.9'
- rails: '4_2'
ruby: '2.7.5'
- rails: '4_2'
ruby: '3.0.3'
- rails: '5_0'
ruby: '3.0.3'
- rails: '5_1'
ruby: '3.0.3'
- rails: '5_2'
ruby: '3.0.3'
- rails: '6_0'
ruby: '2.4.10'
- rails: '6_1'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.5.9'
- rails: '7_0'
ruby: '2.6.9'
- test:
name: "Manticore 3.5"
sphinx_version: 3.5.4
sphinx_engine: manticore
debian: buster
matrix:
parameters:
database: [ 'mysql2', 'postgresql' ]
ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ]
rails: [ '4_2', '5_0', '5_1', '5_2' ]
exclude:
- rails: '4_2'
ruby: '2.5.9'
- rails: '4_2'
ruby: '2.6.9'
- rails: '4_2'
ruby: '2.7.5'
- rails: '4_2'
ruby: '3.0.3'
- rails: '5_0'
ruby: '3.0.3'
- rails: '5_1'
ruby: '3.0.3'
- rails: '5_2'
ruby: '3.0.3'
- rails: '6_0'
ruby: '2.4.10'
- rails: '6_1'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.5.9'
- rails: '7_0'
ruby: '2.6.9'
- test:
name: "Manticore 4.0"
sphinx_version: 4.0.2
sphinx_engine: manticore
debian: buster
matrix:
parameters:
database: [ 'mysql2', 'postgresql' ]
ruby: [ '2.4.10', '2.5.9', '2.6.9', '2.7.5', '3.0.3' ]
rails: [ '4_2', '5_0', '5_1', '5_2' ]
exclude:
- rails: '4_2'
ruby: '2.5.9'
- rails: '4_2'
ruby: '2.6.9'
- rails: '4_2'
ruby: '2.7.5'
- rails: '4_2'
ruby: '3.0.3'
- rails: '5_0'
ruby: '3.0.3'
- rails: '5_1'
ruby: '3.0.3'
- rails: '5_2'
ruby: '3.0.3'
- rails: '6_0'
ruby: '2.4.10'
- rails: '6_1'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.4.10'
- rails: '7_0'
ruby: '2.5.9'
- rails: '7_0'
ruby: '2.6.9'

jobs:
test:
Expand Down Expand Up @@ -164,13 +59,7 @@ jobs:
- run:
name: install bundler
command: |
if [ "<< parameters.ruby >>" == "2.7.5" ]; then
export BUNDLER_VERSION=2.1.4
elif [ "<< parameters.ruby >>" == "3.0.3" ]; then
export BUNDLER_VERSION=2.1.4
else
export BUNDLER_VERSION=1.17.3
fi
export BUNDLER_VERSION=1.17.3
export BUNDLE_PATH=vendor/bundle
gem install bundler:$BUNDLER_VERSION
Expand All @@ -188,11 +77,7 @@ jobs:
name: update gems
environment:
BUNDLE_GEMFILE: "./gemfiles/rails_<< parameters.rails >>.gemfile"
command: |
if [[ -f $BUNDLE_GEMFILE ]]
then
bundle update
fi
command: bundle update

- save_cache:
paths:
Expand All @@ -211,8 +96,4 @@ jobs:
SPHINX_VERSION: << parameters.sphinx_version >>
SPHINX_ENGINE: << parameters.sphinx_engine >>
BUNDLE_GEMFILE: "./gemfiles/rails_<< parameters.rails >>.gemfile"
command: |
if [[ -f $BUNDLE_GEMFILE ]]
then
bundle exec rspec
fi
command: bundle exec rspec
46 changes: 46 additions & 0 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "Test"
description: "Run RSpec in given environment"
inputs:
ruby-version:
description: "Ruby version"
required: true
rails-version:
description: "Rails version"
required: true
sphinx-version:
description: "Sphinx version"
required: true
sphinx-engine:
description: "Sphinx engine"
required: true
database:
description: "Database engine"
required: true
runs:
using: "composite"
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ inputs.ruby-version }}
bundler-cache: true
- name: Set up Sphinx
shell: bash
run: |
./bin/loadsphinx ${{ inputs.sphinx-version }} ${{ inputs.sphinx-engine }}
- name: Set up Appraisal
shell: bash
run: "bundle exec appraisal generate"
- name: Install Appraisal's gems
shell: bash
env:
BUNDLE_GEMFILE: "gemfiles/rails_${{ inputs.rails-version }}.gemfile"
run: bundle install
- name: Test
shell: bash
env:
CI: "true"
DATABASE: ${{ inputs.database }}
SPHINX_VERSION: ${{ inputs.sphinx-version }}
SPHINX_ENGINE: ${{ inputs.sphinx-engine }}
BUNDLE_GEMFILE: "gemfiles/rails_${{ inputs.rails-version }}.gemfile"
run: "bundle exec rspec"
122 changes: 122 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
name: test

on: [push, pull_request]

jobs:
sphinx:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-18.04' ]
ruby: [ '2.7', '3.0', '3.1', '3.2' ]
rails: [ '5_0', '5_1', '5_2', '6_0', '6_1', '7_0' ]
database: [ 'mysql2', 'postgresql' ]
sphinx_version: [ '3.4.1' ]
sphinx_engine: [ 'sphinx' ]
exclude:
- database: 'postgresql'
sphinx_version: '3.4.1'
sphinx_engine: 'sphinx'
- ruby: '3.0'
rails: '5_0'
- ruby: '3.0'
rails: '5_1'
- ruby: '3.0'
rails: '5_2'
- ruby: '3.1'
rails: '5_0'
- ruby: '3.1'
rails: '5_1'
- ruby: '3.1'
rails: '5_2'
- ruby: '3.2'
rails: '5_0'
- ruby: '3.2'
rails: '5_1'
- ruby: '3.2'
rails: '5_2'

services:
postgres:
image: postgres:10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: thinking_sphinx
POSTGRES_DB: thinking_sphinx
ports: ['5432:5432']
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

mysql:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: thinking_sphinx
MYSQL_DATABASE: thinking_sphinx
ports: ['3306:3306']
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/test
with:
ruby-version: ${{ matrix.ruby }}
rails-version: ${{ matrix.rails }}
sphinx-version: ${{ matrix.sphinx_version }}
sphinx-engine: ${{ matrix.sphinx_engine }}
database: ${{ matrix.database }}
timeout-minutes: 12

manticore:
runs-on: ubuntu-20.04

strategy:
fail-fast: false
matrix:
ruby: [ '2.5', '2.6', '2.7', '3.0' ]
rails: [ '5_0', '5_1', '5_2', '6_0', '6_1', '7_0' ]
database: [ 'mysql2', 'postgresql' ]
sphinx_version: [ '3.5.4', '4.0.2' ]
sphinx_engine: [ 'manticore' ]
exclude:
- ruby: '2.5'
rails: '7_0'
- ruby: '2.6'
rails: '7_0'
- ruby: '3.0'
rails: '5_0'
- ruby: '3.0'
rails: '5_1'
- ruby: '3.0'
rails: '5_2'

services:
postgres:
image: postgres:10
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: thinking_sphinx
POSTGRES_DB: thinking_sphinx
ports: ['5432:5432']
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: thinking_sphinx
MYSQL_DATABASE: thinking_sphinx
ports: ['3306:3306']
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/test
with:
ruby-version: ${{ matrix.ruby }}
rails-version: ${{ matrix.rails }}
sphinx-version: ${{ matrix.sphinx_version }}
sphinx-engine: ${{ matrix.sphinx_engine }}
database: ${{ matrix.database }}
timeout-minutes: 12
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
*.gem
*.sublime-*
.bundle
.overmind.env
.rbx
.rspec
.tool-versions
data/*
gemfiles
Gemfile.lock
*.sublime-*
pkg/*
spec/internal/config/test.sphinx.conf
spec/internal/db/sphinx
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to this project (at least, from v3.0.0 onwards) are documented in this file.

## 5.5.0 - 2022-12-30

[Release Notes](https://github.com/pat/thinking-sphinx/releases/tag/v5.5.0)

### Added

* ThinkingSphinx::Processor, a public interface to perform index-related operations on model instances or model name/id combinations. In collaboration with @akostadinov ([#1215](https://github.com/pat/thinking-sphinx/issues/1215)).

### Changed

* Confirmed support by testing against Ruby 3.1 and 3.2 by @jdelStrother ([#1237](https://github.com/pat/thinking-sphinx/pull/1237)).

### Fixed

* Fix YAML loading, by @aepyornis ([#1217](https://github.com/pat/thinking-sphinx/pull/1217)).
* Further fixes for File.exist? instead of the deprecated File.exists?, by @funsim ([#1221](https://github.com/pat/thinking-sphinx/pull/1221)) and @graaf ([1233](https://github.com/pat/thinking-sphinx/pull/1233)).
* Treat unknown column errors as QueryErrors, so retrying the query occurs automatically.
* Fix MariaDB error handling.

## 5.4.0 - 2021-12-21

[Release Notes](https://github.com/pat/thinking-sphinx/releases/tag/v5.4.0)
Expand Down
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ gemspec
gem 'mysql2', '~> 0.5.0', :platform => :ruby
gem 'pg', '~> 0.18.4', :platform => :ruby

gem 'activerecord', '< 7' if RUBY_VERSION.to_f <= 2.4

if RUBY_PLATFORM == 'java'
gem 'jdbc-mysql', '5.1.35', :platform => :jruby
gem 'activerecord-jdbcmysql-adapter', '>= 1.3.23', :platform => :jruby
Expand Down
2 changes: 2 additions & 0 deletions Procfile.support
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
postgres: postgres -D data/postgres -p ${POSTGRES_PORT:-5432}
mysql: $(brew --prefix [email protected])/bin/mysqld --datadir=$(PWD)/data/mysql --port ${MYSQL_PORT:-3306} --socket=mysql.sock
Loading

0 comments on commit 2a67818

Please sign in to comment.