From 3be535bbbb30807c54a69e3c60e1ebbf44accdc8 Mon Sep 17 00:00:00 2001 From: David Rodriguez Date: Tue, 12 Oct 2021 17:51:58 +0200 Subject: [PATCH 1/2] Use Bundler to install dependencies and run tests --- .github/workflows/ubuntu-jruby.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ubuntu-jruby.yml b/.github/workflows/ubuntu-jruby.yml index ac823d6f..56e184d7 100644 --- a/.github/workflows/ubuntu-jruby.yml +++ b/.github/workflows/ubuntu-jruby.yml @@ -16,9 +16,9 @@ jobs: with: ruby-version: ${{ matrix.ruby }} - name: Install dependencies - run: gem install ruby-maven power_assert test-unit rake-compiler + run: bundle install --jobs 1 - name: compile - run: rake compile + run: bundle exec rake compile - name: test continue-on-error: true - run: rake test + run: bundle exec rake test From f203911740ad99f5a41eede9a68f3c424e2776db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Tue, 27 Sep 2022 14:05:18 +0200 Subject: [PATCH 2/2] Only ignore current failures in JRuby This way we should be able to prevent new regressions from being introduced. --- .github/workflows/ubuntu-jruby.yml | 1 - test/psych/test_coder.rb | 6 ++++++ test/psych/test_encoding.rb | 7 +++++++ test/psych/test_parser.rb | 8 ++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ubuntu-jruby.yml b/.github/workflows/ubuntu-jruby.yml index 56e184d7..7fadea26 100644 --- a/.github/workflows/ubuntu-jruby.yml +++ b/.github/workflows/ubuntu-jruby.yml @@ -20,5 +20,4 @@ jobs: - name: compile run: bundle exec rake compile - name: test - continue-on-error: true run: bundle exec rake test diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb index b2be0a41..a6f5ad7f 100644 --- a/test/psych/test_coder.rb +++ b/test/psych/test_coder.rb @@ -220,6 +220,8 @@ def test_coder_style_map_default end def test_coder_style_map_any + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + foo = Psych.dump CustomEncode.new \ map: {a: 1, b: 2}, style: Psych::Nodes::Mapping::ANY, @@ -228,6 +230,8 @@ def test_coder_style_map_any end def test_coder_style_map_block + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + foo = Psych.dump CustomEncode.new \ map: {a: 1, b: 2}, style: Psych::Nodes::Mapping::BLOCK, @@ -236,6 +240,8 @@ def test_coder_style_map_block end def test_coder_style_map_flow + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + foo = Psych.dump CustomEncode.new \ map: { a: 1, b: 2 }, style: Psych::Nodes::Mapping::FLOW, diff --git a/test/psych/test_encoding.rb b/test/psych/test_encoding.rb index e5831c90..7d338148 100644 --- a/test/psych/test_encoding.rb +++ b/test/psych/test_encoding.rb @@ -119,6 +119,8 @@ def test_io_utf8_read_as_binary end def test_emit_alias + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + @emitter.start_stream Psych::Parser::UTF8 @emitter.start_document [], [], true e = assert_raise(RuntimeError) do @@ -151,6 +153,7 @@ def test_start_mapping @emitter.end_mapping @emitter.end_document false @emitter.end_stream + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ @parser.parse @buffer.string assert_encodings @utf8, @handler.strings @@ -170,6 +173,7 @@ def test_start_sequence @emitter.end_sequence @emitter.end_document false @emitter.end_stream + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ @parser.parse @buffer.string assert_encodings @utf8, @handler.strings @@ -187,6 +191,7 @@ def test_doc_tag_encoding @emitter.scalar 'foo', nil, nil, true, false, Nodes::Scalar::ANY @emitter.end_document false @emitter.end_stream + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ @parser.parse @buffer.string assert_encodings @utf8, @handler.strings @@ -263,6 +268,8 @@ def test_doc_tag end def test_dump_non_ascii_string_to_file + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + Tempfile.create(['utf8', 'yml'], :encoding => 'UTF-8') do |t| h = {'one' => 'いち'} Psych.dump(h, t) diff --git a/test/psych/test_parser.rb b/test/psych/test_parser.rb index 3604e7c9..e087e319 100644 --- a/test/psych/test_parser.rb +++ b/test/psych/test_parser.rb @@ -85,6 +85,8 @@ def test_filename def test_line_numbers assert_equal 0, @parser.mark.line + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + @parser.parse "---\n- hello\n- world" line_calls = @handler.marks.map(&:line).zip(@handler.calls.map(&:first)) assert_equal [ @@ -110,6 +112,8 @@ def test_line_numbers def test_column_numbers assert_equal 0, @parser.mark.column + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + @parser.parse "---\n- hello\n- world" col_calls = @handler.marks.map(&:column).zip(@handler.calls.map(&:first)) assert_equal [ @@ -135,6 +139,8 @@ def test_column_numbers def test_index_numbers assert_equal 0, @parser.mark.index + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + @parser.parse "---\n- hello\n- world" idx_calls = @handler.marks.map(&:index).zip(@handler.calls.map(&:first)) assert_equal [ @@ -352,6 +358,8 @@ def test_start_document_tag end def test_event_location + pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/ + @parser.parse "foo:\n" \ " barbaz: [1, 2]"