Skip to content
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

Get CI passing on Rails main again #482

Merged
merged 3 commits into from
Feb 28, 2024
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
34 changes: 26 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ jobs:
- ruby: '3.0'
gemfile: rails_5_2

# Rails 7 requires Ruby 2.7 or higher
# Rails 8 requires Ruby 3.1 or higher
- ruby: '2.6'
gemfile: rails_main

- ruby: '2.7'
gemfile: rails_main

- ruby: '3.0'
gemfile: rails_main

- ruby: '2.6'
gemfile: rails_7_0

Expand Down Expand Up @@ -89,13 +95,19 @@ jobs:
- ruby: '3.0'
gemfile: rails_5_2

# Rails 7 requires Ruby 2.7 or higher
# Rails 8 requires Ruby 3.1 or higher
- ruby: '2.6'
gemfile: rails_main

- ruby: '2.7'
gemfile: rails_main

- ruby: '3.0'
gemfile: rails_main

- ruby: '2.6'
gemfile: rails_7_0

- ruby: '2.6'
gemfile: rails_7_1
env:
Expand Down Expand Up @@ -158,15 +170,21 @@ jobs:
- ruby: '3.0'
gemfile: rails_5_2

# Rails 7 requires Ruby 2.7 or higher
# Rails 8 requires Ruby 3.1 or higher
- ruby: '2.6'
gemfile: rails_7_0

gemfile: rails_main

- ruby: '2.7'
gemfile: rails_main

- ruby: '3.0'
gemfile: rails_main

- ruby: '2.6'
gemfile: rails_7_1
gemfile: rails_7_0

- ruby: '2.6'
gemfile: rails_main
gemfile: rails_7_1
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_PATH_RELATIVE_TO_CWD: true
Expand Down
1 change: 1 addition & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ end

appraise "rails-main" do
gem "rails", github: "rails/rails", branch: "main"
gem "rspec-rails", "~> 6.0.2"
end
1 change: 1 addition & 0 deletions gemfiles/rails_main.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
source "https://rubygems.org"

gem "rails", github: "rails/rails", branch: "main"
gem "rspec-rails", "~> 6.0.2"

platforms :ruby do
gem "sqlite3"
Expand Down
4 changes: 2 additions & 2 deletions spec/awesome_nested_set_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1225,13 +1225,13 @@ def check_structure(entries, structure)
it "should sort by custom sort column" do
expect(OrderedCategory.acts_as_nested_set_options[:order_column]).to eq('name')
expect(OrderedCategory.order_column_name).to eq('name')
expect(OrderedCategory.first.children.explain).to include('ORDER BY name')
expect(OrderedCategory.first.children.explain.inspect).to include('ORDER BY name')
end

it "should sort by custom hash sort" do
expect(HashOrderedCategory.acts_as_nested_set_options[:order_column]).to eq({ :name => :desc })
expect(HashOrderedCategory.order_column_name).to eq({ :name => :desc })
expect(HashOrderedCategory.first.children.explain).to include(
expect(HashOrderedCategory.first.children.explain.inspect).to include(
"ORDER BY #{HashOrderedCategory.quoted_table_name}.#{HashOrderedCategory.connection.quote_column_name(:name)} DESC"
)
end
Expand Down
Loading