Display error messages outside the groups so can be found quickly
This commit is contained in:
parent
e809bd31fd
commit
6d6b1e5990
@ -1,6 +1,7 @@
|
|||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
require 'timeout'
|
require 'timeout'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
require_relative 'lib/colorize'
|
||||||
|
|
||||||
ENV.delete("GNUMAKEFLAGS")
|
ENV.delete("GNUMAKEFLAGS")
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ allowed_failures = allowed_failures.split(',').reject(&:empty?)
|
|||||||
|
|
||||||
ENV["GEM_PATH"] = [File.realpath('.bundle'), File.realpath('../.bundle', __dir__)].join(File::PATH_SEPARATOR)
|
ENV["GEM_PATH"] = [File.realpath('.bundle'), File.realpath('../.bundle', __dir__)].join(File::PATH_SEPARATOR)
|
||||||
|
|
||||||
|
colorize = Colorize.new
|
||||||
rake = File.realpath("../../.bundle/bin/rake", __FILE__)
|
rake = File.realpath("../../.bundle/bin/rake", __FILE__)
|
||||||
gem_dir = File.realpath('../../gems', __FILE__)
|
gem_dir = File.realpath('../../gems', __FILE__)
|
||||||
dummy_rake_compiler_dir = File.realpath('../dummy-rake-compiler', __FILE__)
|
dummy_rake_compiler_dir = File.realpath('../dummy-rake-compiler', __FILE__)
|
||||||
@ -74,19 +76,21 @@ File.foreach("#{gem_dir}/bundled_gems") do |line|
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
|
print "##[endgroup]\n" if github_actions
|
||||||
unless $?.success?
|
unless $?.success?
|
||||||
|
|
||||||
puts "Tests failed " +
|
mesg = "Tests failed " +
|
||||||
($?.signaled? ? "by SIG#{Signal.signame($?.termsig)}" :
|
($?.signaled? ? "by SIG#{Signal.signame($?.termsig)}" :
|
||||||
"with exit code #{$?.exitstatus}")
|
"with exit code #{$?.exitstatus}")
|
||||||
|
puts colorize.decorate(mesg, "fail")
|
||||||
if allowed_failures.include?(gem)
|
if allowed_failures.include?(gem)
|
||||||
puts "Ignoring test failures for #{gem} due to \$TEST_BUNDLED_GEMS_ALLOW_FAILURES"
|
mesg = "Ignoring test failures for #{gem} due to \$TEST_BUNDLED_GEMS_ALLOW_FAILURES"
|
||||||
|
puts colorize.decorate(mesg, "skip")
|
||||||
else
|
else
|
||||||
failed << gem
|
failed << gem
|
||||||
exit_code = $?.exitstatus if $?.exitstatus
|
exit_code = $?.exitstatus if $?.exitstatus
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
print "##[endgroup]\n" if github_actions
|
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Failed gems: #{failed.join(', ')}" unless failed.empty?
|
puts "Failed gems: #{failed.join(', ')}" unless failed.empty?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user