From 727a8cf1977f0823ff0296f693a0ef71b75d1268 Mon Sep 17 00:00:00 2001 From: Pierre Merlin Date: Mon, 23 Nov 2026 17:05:35 +0100 Subject: [PATCH 1/3] ci: test against Ruby 4.0, ActiveModel 8.1 and Couchbase Server 7.6 Add matrix entries matching the doctolib/doctolib stack so that a gem bump cannot break it silently: - Ruby 4.0 + ActiveModel 8.1.4 + Couchbase Server 7.6.13 - Ruby 3.4 + ActiveModel 8.1.4 + Couchbase Server 7.6.13 (isolates Ruby 4 regressions from Rails/Server ones) Couchbase Server 7.6 no longer publishes ubuntu20.04 packages, only a generic "linux" one, so run_couchbase.sh now falls back to it. Relax the rake development dependency from ~> 12.2 to >= 12.2: rake 12 requires ostruct, which is no longer a default gem in Ruby 4.0, so bundle install failed there. Refs BC-3546 Co-Authored-By: Claude Opus 5.5 --- .github/workflows/test.yml | 7 +++++++ ci/run_couchbase.sh | 17 +++++++++++++++-- couchbase-orm.gemspec | 2 +- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8d2b1dd..a1a286e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,13 @@ jobs: strategy: matrix: include: + # Mirrors the doctolib/doctolib production stack + - ruby: '4.0' + active-model: '8.1.4' + couchbase: '7.6.13' + - ruby: '3.4' + active-model: '8.1.4' + couchbase: '7.6.13' - ruby: '3.4' active-model: '8.0.2' couchbase: '7.2.3' diff --git a/ci/run_couchbase.sh b/ci/run_couchbase.sh index 870d0b3..c336bb4 100755 --- a/ci/run_couchbase.sh +++ b/ci/run_couchbase.sh @@ -7,8 +7,21 @@ USER=$3 PASSWORD=$4 -wget https://packages.couchbase.com/releases/$VERSION/couchbase-server-enterprise_$VERSION-ubuntu20.04_amd64.deb -dpkg -i couchbase-server-enterprise_$VERSION-ubuntu20.04_amd64.deb +# Couchbase Server 7.6+ only publishes a generic "linux" package; older +# releases also ship distro-specific ones. Try the distro one first. +PACKAGE="" +for FLAVOR in ubuntu20.04 linux; do + CANDIDATE=couchbase-server-enterprise_$VERSION-${FLAVOR}_amd64.deb + if wget -q https://packages.couchbase.com/releases/$VERSION/$CANDIDATE; then + PACKAGE=$CANDIDATE + break + fi +done +if [ -z "$PACKAGE" ]; then + echo "No Couchbase Server package found for version $VERSION" >&2 + exit 1 +fi +dpkg -i $PACKAGE sleep 8 sudo service couchbase-server status /opt/couchbase/bin/couchbase-cli cluster-init -c 127.0.0.1:8091 --cluster-username=admin --cluster-password=password --cluster-ramsize=320 --cluster-index-ramsize=256 --cluster-fts-ramsize=256 --services=data,index,query,fts diff --git a/couchbase-orm.gemspec b/couchbase-orm.gemspec index 78cbde0..6ff1829 100644 --- a/couchbase-orm.gemspec +++ b/couchbase-orm.gemspec @@ -25,7 +25,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'json-schema', '>= 3' # validating JSON against a schema gem.add_runtime_dependency 'logger', '~> 1.6' # Required from Ruby 3.5.0+ - gem.add_development_dependency 'rake', '~> 12.2' + gem.add_development_dependency 'rake', '>= 12.2' gem.add_development_dependency 'rspec', '~> 3.7' gem.add_development_dependency 'yard', '~> 0.9' gem.add_development_dependency 'pry' From ece8168583c6f1986b10e3f4ddec29a26d131c70 Mon Sep 17 00:00:00 2001 From: Pierre Merlin Date: Mon, 23 Nov 2026 17:22:28 +0100 Subject: [PATCH 2/3] Also add CB 8.0.4 --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1a286e..fd73b4f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,9 @@ jobs: strategy: matrix: include: - # Mirrors the doctolib/doctolib production stack + - ruby: '4.0' + active-model: '8.1.4' + couchbase: '8.0.4' - ruby: '4.0' active-model: '8.1.4' couchbase: '7.6.13' From c23d3dc02dcd1cc447dcdfef5e928b41707ee295 Mon Sep 17 00:00:00 2001 From: Pierre Merlin Date: Mon, 23 Nov 2026 17:27:39 +0100 Subject: [PATCH 3/3] Apply suggestion from @pimpin --- .github/workflows/test.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd73b4f..f3636ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,9 +11,6 @@ jobs: strategy: matrix: include: - - ruby: '4.0' - active-model: '8.1.4' - couchbase: '8.0.4' - ruby: '4.0' active-model: '8.1.4' couchbase: '7.6.13'