Skip to content

Commit

Permalink
Merge pull request #2692 from rspec/add-rails-71-directly
Browse files Browse the repository at this point in the history
Add Rails 7.1 builds
  • Loading branch information
JonRowe committed Oct 20, 2023
2 parents cb100e0 + b4227ab commit 9681266
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,34 @@ jobs:
fail-fast: false
matrix:
include:
# Edge Rails (?) builds >= 2.7
- ruby: 3.2
env:
RAILS_VERSION: 'main'
- ruby: 3.1
env:
RAILS_VERSION: 'main'
- ruby: '3.0'
env:
RAILS_VERSION: 'main'
- ruby: 2.7
env:
RAILS_VERSION: 'main'

# Rails 7.1 builds >= 2.7
- ruby: 3.2
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: 3.1
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: '3.0'
env:
RAILS_VERSION: '~> 7.1.0'
- ruby: 2.7
env:
RAILS_VERSION: '~> 7.1.0'

# Rails 7.0 builds >= 2.7
- ruby: 3.2
env:
Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,11 @@ namespace :smoke do
task app: ["clobber:app", "generate:app", "generate:stuff", :smoke]

desc "run in the example app"
task({ run: ["clobber:app", "generate:app", "generate:stuff"] }, [:cmd]) do |_t, args|
task :run, [:cmd] do |_t, args|
unless ENV['SKIP_GENERATE']
["clobber:app", "generate:app", "generate:stuff"].map { |task| Rake::Task[task].invoke }
end

in_example_app args.cmd.to_s
end

Expand Down
1 change: 1 addition & 0 deletions example_app_generator/generate_stuff.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def source_paths
end

def setup_tasks
copy_file 'config/initializers/zeitwerk.rb'
copy_file 'app/models/in_memory/model.rb'
copy_file 'lib/rails/generators/in_memory/model/model_generator.rb'
copy_file 'lib/rails/generators/in_memory/model/templates/model.rb.erb'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if Rails.autoloaders.respond_to?(:main)
Rails.autoloaders.main.ignore('lib/rails/generators/in_memory/model/model_generator.rb')
end

0 comments on commit 9681266

Please sign in to comment.