Skip to content

Commit 4eedca0

Browse files
authored
Fix CI (#2288)
* trigger CI * puts ruby version * try adding CI builds for ruby 3.5 * allocations * lock to ruby 3.5 and rails main * Update README.md * Update test/sandbox/test/mailer_test.rb * try this build combination * lint * ruby tool version * allocations * how copilot says we should avoid float comparison
1 parent a8ae59a commit 4eedca0

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,18 @@ jobs:
6565
- ruby_version: "3.4"
6666
rails_version: "8.0"
6767
mode: "capture_patch_enabled"
68-
- ruby_version: "head"
68+
- ruby_version: "3.4"
6969
rails_version: "main"
7070
mode: "capture_patch_disabled"
71-
- ruby_version: "head"
71+
- ruby_version: "3.4"
7272
rails_version: "main"
7373
mode: "capture_patch_enabled"
74+
- ruby_version: "3.5"
75+
rails_version: "8.0"
76+
mode: "capture_patch_disabled"
77+
- ruby_version: "3.5"
78+
rails_version: "8.0"
79+
mode: "capture_patch_enabled"
7480
env:
7581
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails_version }}.gemfile
7682
steps:

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.4.2
1+
ruby 3.4.3

test/sandbox/test/rendering_test.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@ def test_render_inline_allocations
1515
ViewComponent::CompileCache.cache.delete(MyComponent)
1616
MyComponent.ensure_compiled
1717

18-
allocations = (Rails.version.to_f >= 8.0) ?
19-
{"3.5.0" => 119, "3.4.3" => 125, "3.3.8" => 137} :
20-
{"3.3.8" => 128, "3.3.0" => 140, "3.2.8" => 126, "3.1.7" => 126, "3.0.7" => 135}
18+
allocations =
19+
if Rails.version.to_f < 8.0
20+
{"3.3.8" => 128, "3.3.0" => 140, "3.2.8" => 126, "3.1.7" => 126, "3.0.7" => 135}
21+
elsif Rails.version.split(".").first(2).map(&:to_i) == [8, 0]
22+
{"3.5.0" => 121, "3.4.3" => 125, "3.3.8" => 137}
23+
else
24+
{"3.4.3" => 123}
25+
end
2126

2227
assert_allocations(**allocations) do
2328
render_inline(MyComponent.new)

view_component.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
3131
"docs/CHANGELOG.md",
3232
"lib/rails/**/*.rb",
3333
"lib/view_component.rb",
34-
"lib/view_component/**/*.rb",
34+
"lib/view_component/**/*.rb"
3535
]
3636
spec.require_paths = ["lib"]
3737

0 commit comments

Comments
 (0)