Skip to content

Commit 80b6f83

Browse files
committed
Add builds for Rails 8.1
1 parent c112d70 commit 80b6f83

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ jobs:
4747
env:
4848
RAILS_VERSION: 'main'
4949

50+
# Rails 8.1 builds >= 3.2
51+
- ruby: 3.4
52+
env:
53+
RAILS_VERSION: '~> 8.1.0'
54+
- ruby: 3.3
55+
env:
56+
RAILS_VERSION: '~> 8.1.0'
57+
- ruby: 3.2
58+
env:
59+
RAILS_VERSION: '~> 8.1.0'
60+
5061
# Rails 8.0 builds >= 3.2
5162
- ruby: 3.4
5263
env:

example_app_generator/run_specs.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,12 @@
1010
run('bin/rake --backtrace spec:controllers') || abort
1111
run('bin/rake --backtrace spec:helpers') || abort
1212
run('bin/rake --backtrace spec:mailers') || abort
13-
run("bin/rake --backtrace stats") || abort
13+
14+
rails_version = ENV['RAILS_VERSION'].gsub(/[^0-9\.]/, '').to_f
15+
stats_command =
16+
if rails_version > 0 && rails_version < 8.1
17+
"bin/rake --backtrace stats"
18+
else
19+
"bin/rails --backtrace stats"
20+
end
21+
run(stats_command) || abort

0 commit comments

Comments
 (0)