summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2022-10-07 17:14:30 +0900
committerGitHub <noreply@github.com>2022-10-07 17:14:30 +0900
commited5ce03abfaa5f4702a49cfcab88be2bfd1a19ab (patch)
tree950b70c97fe759b8ba6aaebfd6f662ae7db0562b
parent154ff50149be78c9b4c054e9c23bc9c9f3708f3b (diff)
parentf203911740ad99f5a41eede9a68f3c424e2776db (diff)
downloadpsych-ed5ce03abfaa5f4702a49cfcab88be2bfd1a19ab.tar.gz
Merge pull request #524 from deivid-rodriguez/fix_jruby_ci
Only skip specific failures on JRuby instead of ignoring the whole CI feedback
-rw-r--r--.github/workflows/ubuntu-jruby.yml7
-rw-r--r--test/psych/test_coder.rb6
-rw-r--r--test/psych/test_encoding.rb7
-rw-r--r--test/psych/test_parser.rb8
4 files changed, 24 insertions, 4 deletions
diff --git a/.github/workflows/ubuntu-jruby.yml b/.github/workflows/ubuntu-jruby.yml
index ac823d6..7fadea2 100644
--- a/.github/workflows/ubuntu-jruby.yml
+++ b/.github/workflows/ubuntu-jruby.yml
@@ -16,9 +16,8 @@ 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
diff --git a/test/psych/test_coder.rb b/test/psych/test_coder.rb
index b2be0a4..a6f5ad7 100644
--- a/test/psych/test_coder.rb
+++ b/test/psych/test_coder.rb
@@ -220,6 +220,8 @@ module Psych
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 @@ module Psych
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 @@ module Psych
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 e5831c9..7d33814 100644
--- a/test/psych/test_encoding.rb
+++ b/test/psych/test_encoding.rb
@@ -119,6 +119,8 @@ module Psych
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 @@ module Psych
@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 @@ module Psych
@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 @@ module Psych
@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 @@ module Psych
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 3604e7c..e087e31 100644
--- a/test/psych/test_parser.rb
+++ b/test/psych/test_parser.rb
@@ -85,6 +85,8 @@ module Psych
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 @@ module Psych
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 @@ module Psych
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 @@ module Psych
end
def test_event_location
+ pend "Failing on JRuby" if RUBY_PLATFORM =~ /java/
+
@parser.parse "foo:\n" \
" barbaz: [1, 2]"