Skip to content

Commit cd645f8

Browse files
Daniel Wheelerclaude
andcommitted
AC-1305 chore: fix CI matrix (sqlite3 pin, drop unsupportable Rails edge)
Three separate causes, all observed in run 33625139653: * Rails 6.1/7.0 on Ruby 3.0/3.1 (4 jobs): their sqlite3_adapter declares `gem "sqlite3", "~> 1.4"`, but the gemspec's sqlite3 dev dependency is unpinned, so Bundler resolved sqlite3 2.x -> "can't activate sqlite3 (~> 1.4), already activated sqlite3-2.8.1". Ruby 2.7 passed only because sqlite3 2.x needs Ruby >= 3.0, so it got sqlite3 1.7.3. Fixed by pinning sqlite3 ~> 1.4 in those two gemfiles. * Rails edge on Ruby 2.7/3.0/3.1 (3 jobs): rails main is 8.2.0.alpha, whose actionpack.gemspec requires Ruby >= 3.3.1, so Bundler cannot resolve on any Ruby in the matrix. * Rails edge/7.2+ on any Ruby: test/helper.rb builds a bare RouteSet with no Rails app, and Rails 7.2 changed with_routing/reset_routes to reset through the app -> 25-27 errors ("undefined method `config' for nil"). This needs a source change, not a matrix change, so edge is dropped rather than left permanently red. Coverage goes from 9 jobs (2 green) to 10 jobs, adding Rails 7.1 on Ruby 3.1-3.4. Rails 7.1 verified green locally on Ruby 3.3 and 3.4 (52 runs, 167 assertions, 0 failures, 0 errors). Also bumps actions/checkout v2 -> v4 (hygiene; v2 is forced onto Node 24). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 41f0176 commit cd645f8

5 files changed

Lines changed: 29 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,28 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
fail-fast: false
9+
# Explicit combinations rather than a cross-product: each Rails version
10+
# here supports a different Ruby range, and Rails 6.1/7.0 additionally
11+
# require sqlite3 ~> 1.4 (pinned in their gemfiles), which is not
12+
# installable on every Ruby in the matrix.
913
matrix:
10-
ruby: ['2.7', '3.0', '3.1']
11-
rails: ['6.1', '7.0', 'edge']
14+
include:
15+
- { ruby: '2.7', rails: '6.1' }
16+
- { ruby: '3.0', rails: '6.1' }
17+
- { ruby: '3.1', rails: '6.1' }
18+
- { ruby: '2.7', rails: '7.0' }
19+
- { ruby: '3.0', rails: '7.0' }
20+
- { ruby: '3.1', rails: '7.0' }
21+
- { ruby: '3.1', rails: '7.1' }
22+
- { ruby: '3.2', rails: '7.1' }
23+
- { ruby: '3.3', rails: '7.1' }
24+
- { ruby: '3.4', rails: '7.1' }
1225
env:
1326
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile
1427
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}
1528
steps:
1629
- name: Check out code
17-
uses: actions/checkout@v2
30+
uses: actions/checkout@v4
1831
- name: Set up Ruby ${{ matrix.ruby }}
1932
uses: ruby/setup-ruby@v1
2033
with:

gemfiles/rails_6.1.gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ gem "actionpack", github: "rails/rails", branch: "6-1-stable"
44
gem "activerecord", github: "rails/rails", branch: "6-1-stable"
55
gem "railties", github: "rails/rails", branch: "6-1-stable"
66
gem "rack", "< 3"
7+
# Rails 6.1's sqlite3_adapter declares `gem "sqlite3", "~> 1.4"`, so 2.x cannot be used.
8+
gem "sqlite3", "~> 1.4"
79

810
gemspec :path => "../"

gemfiles/rails_7.0.gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ gem "actionpack", github: "rails/rails", branch: "7-0-stable"
44
gem "activerecord", github: "rails/rails", branch: "7-0-stable"
55
gem "railties", github: "rails/rails", branch: "7-0-stable"
66
gem "rack", "< 3"
7+
# Rails 7.0's sqlite3_adapter declares `gem "sqlite3", "~> 1.4"`, so 2.x cannot be used.
8+
gem "sqlite3", "~> 1.4"
79

810
gemspec :path => "../"

gemfiles/rails_7.1.gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
source "https://rubygems.org"
2+
3+
gem "actionpack", "~> 7.1.0"
4+
gem "activerecord", "~> 7.1.0"
5+
gem "railties", "~> 7.1.0"
6+
7+
# Rails 7.1 relaxed its sqlite3 constraint, so no pin is needed here.
8+
9+
gemspec :path => "../"

gemfiles/rails_edge.gemfile

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)