Skip to content

Add Rails 8 to the CI #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
38 changes: 14 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- "7.0"
- "7.1"
- "7.2"
- "8.0"

ruby:
- "2.4"
Expand All @@ -40,64 +41,48 @@ jobs:
exclude:
- rails: "4.2"
ruby: "2.7"

- rails: "4.2"
ruby: "3.0"

- rails: "4.2"
ruby: "3.1"

- rails: "4.2"
ruby: "3.2"

- rails: "4.2"
ruby: "3.3"

- rails: "5.0"
ruby: "3.0"

- rails: "5.0"
ruby: "3.1"

- rails: "5.0"
ruby: "3.2"

- rails: "5.0"
ruby: "3.3"

- rails: "5.1"
ruby: "3.0"

- rails: "5.1"
ruby: "3.1"

- rails: "5.1"
ruby: "3.2"

- rails: "5.1"
ruby: "3.3"

- rails: "5.2"
ruby: "3.0"

- rails: "5.2"
ruby: "3.1"

- rails: "5.2"
ruby: "3.2"

- rails: "5.2"
ruby: "3.3"

- rails: "6.0"
ruby: "2.4"

- rails: "6.0"
ruby: "3.1"

- rails: "6.0"
ruby: "3.2"

- rails: "6.0"
ruby: "3.3"

Expand All @@ -106,37 +91,42 @@ jobs:

- rails: "7.0"
ruby: "2.4"

- rails: "7.0"
ruby: "2.5"

- rails: "7.0"
ruby: "2.6"

- rails: "7.1"
ruby: "2.4"

- rails: "7.1"
ruby: "2.5"

- rails: "7.1"
ruby: "2.6"

- rails: "7.2"
ruby: "2.4"

- rails: "7.2"
ruby: "2.5"

- rails: "7.2"
ruby: "2.6"

- rails: "7.2"
ruby: "2.7"

- rails: "7.2"
ruby: "3.0"

- rails: "8.0"
ruby: "2.4"
- rails: "8.0"
ruby: "2.5"
- rails: "8.0"
ruby: "2.6"
- rails: "8.0"
ruby: "2.7"
- rails: "8.0"
ruby: "3.0"
- rails: "8.0"
ruby: "3.1"

env:
BUNDLE_GEMFILE: ${{ github.workspace }}/spec/gemfiles/Gemfile.rails-${{ matrix.rails }}

Expand Down
2 changes: 1 addition & 1 deletion lib/axlsx_rails/action_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if Rails.version.to_f >= 5
unless Mime[:xlsx]
Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx
Mime::Type.register 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', :xlsx
end
else
unless defined? Mime::XLSX
Expand Down
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile.rails-7.1
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ gem 'thin'
gem 'capybara', '~> 3.0'
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'

gem 'byebug'
gem 'debug'
2 changes: 1 addition & 1 deletion spec/gemfiles/Gemfile.rails-7.2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ gem 'thin'
gem 'capybara', '~> 3.0'
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'

gem 'byebug'
gem 'debug'
14 changes: 14 additions & 0 deletions spec/gemfiles/Gemfile.rails-8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
source "http://rubygems.org"

gemspec path: '../../'

gem 'rails', '~> 8.0.0'
gem 'responders', '~> 3.0'
gem 'sqlite3'
gem 'sprockets', '~> 4.0'
gem 'jquery-rails'
gem 'thin'
gem 'capybara', '~> 3.0'
gem 'acts_as_caxlsx', git: 'https://github.com/caxlsx/acts_as_caxlsx.git'

gem 'debug'
9 changes: 8 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
require 'rspec/rails'
require 'capybara/rspec'
require 'roo'
require 'byebug'
begin
# Used for Ruby 2.x
require 'byebug'
rescue LoadError
# Used for Ruby 3.x
require 'debug'
end

ActiveRecord::Migration.maintain_test_schema!

Expand All @@ -26,6 +32,7 @@
config.use_transactional_fixtures = false
config.infer_base_class_for_anonymous_controllers = false
config.order = "random"
config.filter_run_when_matching :focus
end

# TODO: move to the support folder
Expand Down
Loading