Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,26 @@ jobs:
bundler-cache: true
- run: bundle exec rake standard rubocop rbs steep security

latest_rails:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
BUNDLE_GEMFILE: gemfiles/latest_rails.gemfile
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1
with:
ruby-version: "4.0"
bundler-cache: false
- run: bundle install --jobs 4
- name: Show resolved Rails and Rack
run: |
for gem in activerecord actionpack railties rack; do
bundle info "$gem"
done
- run: bundle exec rake test
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
- run: bundle exec rake at_least_once

release:
if: startsWith(github.ref, 'refs/tags/v')
needs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
/.claude
/.codex
/node_modules
/gemfiles/*.lock
14 changes: 14 additions & 0 deletions gemfiles/latest_rails.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Unlocked appraisal of the newest activerecord, actionpack, railties, and
# rack the gemspec's >= bounds allow. CI resolves this Gemfile fresh on every
# run; do not commit a lockfile.
source "https://rubygems.org"

gemspec path: ".."

group :development, :test do
gem "activejob", ">= 7.1", require: false
gem "mysql2", ">= 0.5", require: false
gem "pg", ">= 1.5", require: false
gem "redis", ">= 5.0", require: false
gem "sqlite3", ">= 2.1", require: false
end
2 changes: 1 addition & 1 deletion test/integration/active_record_load_timing_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ActiveRecordLoadTimingTest < ActiveSupport::TestCase
# before the question was asked.
def probe_result
output, error_output, status = Open3.capture3(
{ "BUNDLE_GEMFILE" => gem_root("Gemfile") },
{ "BUNDLE_GEMFILE" => bundle_gemfile },
Gem.ruby,
"-e",
probe,
Expand Down
6 changes: 3 additions & 3 deletions test/integration/cli_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ class CLITest < ActiveSupport::TestCase
dummy_root = File.expand_path("../dummy", __dir__)
_output, error_output, status = Open3.capture3(
{
"BUNDLE_GEMFILE" => File.expand_path("../../Gemfile", __dir__),
"BUNDLE_GEMFILE" => bundle_gemfile,
"RAILS_ENV" => "test",
"SOLID_OBJECTS_DUMMY_DATABASE" => File.join(directory, "dummy.sqlite3")
},
Expand All @@ -105,7 +105,7 @@ class CLITest < ActiveSupport::TestCase
database = File.join(directory, "dummy.sqlite3")
completed = File.join(directory, "completed")
environment = {
"BUNDLE_GEMFILE" => File.expand_path("../../Gemfile", __dir__),
"BUNDLE_GEMFILE" => bundle_gemfile,
"RAILS_ENV" => "test",
"SOLID_OBJECTS_CLI_WORKER_PROBE" => completed,
"SOLID_OBJECTS_DUMMY_DATABASE" => database
Expand Down Expand Up @@ -159,7 +159,7 @@ class CLITest < ActiveSupport::TestCase

def worker_environment(directory, probe)
{
"BUNDLE_GEMFILE" => File.expand_path("../../Gemfile", __dir__),
"BUNDLE_GEMFILE" => bundle_gemfile,
"RAILS_ENV" => "test",
"SOLID_OBJECTS_CLI_WORKER_PROBE" => probe,
"SOLID_OBJECTS_DUMMY_DATABASE" => File.join(directory, "dummy.sqlite3")
Expand Down
2 changes: 1 addition & 1 deletion test/integration/load_contract_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class LoadContractTest < ActiveSupport::TestCase
def undefined_after_require
@undefined_after_require ||= begin
output, error_output, status = Open3.capture3(
{ "BUNDLE_GEMFILE" => gem_root("Gemfile") },
{ "BUNDLE_GEMFILE" => bundle_gemfile },
Gem.ruby,
"-e",
probe,
Expand Down
12 changes: 12 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,16 @@ class ActiveSupport::TestCase
SolidObjects.configuration.authorize_query = ->(**) { true }
SolidObjects.configuration.authorize_destroy = ->(**) { true }
end

private

# Prefer the bundle this process was launched with so CI jobs that set
# BUNDLE_GEMFILE also exercise that bundle in child processes. Expand the
# path because some children change directories.
def bundle_gemfile
selected = ENV["BUNDLE_GEMFILE"]
return File.expand_path(selected) unless selected.nil? || selected.empty?

File.expand_path("../Gemfile", __dir__)
end
end
Loading