Skip to content

Commit d60d6f4

Browse files
authored
Merge pull request #848 from varvet/kbs/adjust-ci-on-main
Fix CI for JRuby broken on main due to outside influence
2 parents a82833b + 33644b7 commit d60d6f4

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

.github/workflows/main.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- "3.1"
3131
- "3.2"
3232
- "3.3"
33-
- "jruby-9.3.10" # oldest supported jruby
33+
- "jruby-9.3.15"
3434
- "jruby"
3535
include: # HEAD-versions
3636
- ruby-version: "head"
@@ -47,12 +47,7 @@ jobs:
4747
with:
4848
rubygems: latest
4949
ruby-version: ${{ matrix.ruby-version }}
50-
bundler-cache: ${{ !startsWith(matrix.ruby-version, 'jruby') }}
51-
- name: Bundler install (JRuby workaround)
52-
if: ${{ startsWith(matrix.ruby-version, 'jruby') }}
53-
run: |
54-
gem install psych
55-
bundle install
50+
bundler-cache: true
5651
- name: Run tests
5752
run: bundle exec rspec
5853

Gemfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ source "https://rubygems.org"
44

55
gemspec
66

7-
# https://github.com/ruby/psych/issues/655
8-
gem "psych", "!= 5.1.1", platforms: %i[jruby]
7+
# Affects us on JRuby 9.3.15.
8+
#
9+
# @see https://github.com/rails/rails/issues/54260
10+
gem "logger"

spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
end
1919
end
2020

21+
# @see https://github.com/rails/rails/issues/54260
22+
require "logger" if RUBY_ENGINE == "jruby" && RUBY_ENGINE_VERSION.start_with?("9.3")
23+
2124
require "pundit"
2225
require "pundit/rspec"
2326
require "active_model/naming"

spec/support/lib/controller.rb

-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ def #{method}(*args, **kwargs, &block)
2828

2929
include Pundit::Authorization
3030
# Mark protected methods public so they may be called in test
31-
# rubocop:disable Style/AccessModifierDeclarations
3231
public(*Pundit::Authorization.protected_instance_methods)
33-
# rubocop:enable Style/AccessModifierDeclarations
3432

3533
def initialize(current_user, action_name, params)
3634
@current_user = current_user

0 commit comments

Comments
 (0)