ci-queue 0.30.0 → 0.31.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38ef31e58e85eed042bdfd90ceb5b6bb02adc6a842ad6a553730325235433af2
4
- data.tar.gz: 629e6617553d6a59468b45eda582502960e335312be212edd39e931ebc883a93
3
+ metadata.gz: fdd7b371fdadda905994e7b736eddac19265db401483fad83612c3bfb5b054bb
4
+ data.tar.gz: 8e49ed6b35ece9ba9aa7c4876e75512f1bfa05375aa6d976a7813eb5cb304502
5
5
  SHA512:
6
- metadata.gz: d1a67bfd6f6e3943a11e0033c0f1d11f8d187fa082c6f9de3c0bcb97049a6093cde2ac49dfb39a66cd79b352f20227a35aa0a011223a61fd4bb213d225bf1fe4
7
- data.tar.gz: 833ba58c0c2b05780f5edc709eae9f2e1b78c72a8c49dbadb1ebc376d5cde0352d7fdc3f0e9b8e96dc27f8a53c01ec3ba8527b6435d50f085a0f8042abb88a86
6
+ metadata.gz: ee4e5d450227ff962c4606e759e5d15272f5c808ff690b77dfb7ff403a989c4ffd860af75fb18e15a14354523ae96b66f6b67d5035b14880e3342ee63f254f5b
7
+ data.tar.gz: ca3c985d44043f4348708bf43b789c3b24d988dc74aeac710bf1a6f58fb8bfb309288b0a58b98dab8ece480713e73c443dae30e2118a29e19514094d3fc17959
data/dev.yml CHANGED
@@ -5,7 +5,7 @@ name: ci-queue
5
5
  up:
6
6
  - ruby: 2.6.5
7
7
  - bundler
8
- - isogun
8
+ - redis
9
9
 
10
10
  commands:
11
11
  test: REDIS_URL=${REDIS_URL:-redis://ci-queue.railgun/0} bundle exec rake test TEST_FILES="$*"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.30.0'
5
+ VERSION = '0.31.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -4,7 +4,7 @@ require 'minitest/reporters'
4
4
 
5
5
  module Minitest
6
6
  module Queue
7
- class LocalRequeueReporter < Minitest::Reporters::BaseReporter
7
+ class LocalRequeueReporter < Minitest::Reporters::DefaultReporter
8
8
  include ::CI::Queue::OutputHelpers
9
9
  attr_accessor :requeues
10
10
 
@@ -68,7 +68,7 @@ module Minitest
68
68
  set_load_path
69
69
  Minitest.queue = queue
70
70
  reporters = [
71
- LocalRequeueReporter.new,
71
+ LocalRequeueReporter.new(verbose: verbose),
72
72
  BuildStatusRecorder.new(build: queue.build),
73
73
  JUnitReporter.new,
74
74
  TestDataReporter.new(namespace: queue_config&.namespace),
@@ -88,9 +88,36 @@ module Minitest
88
88
  load_tests
89
89
  populate_queue
90
90
  end
91
+
92
+ at_exit {
93
+ verify_reporters!(reporters)
94
+ }
91
95
  # Let minitest's at_exit hook trigger
92
96
  end
93
97
 
98
+ def verify_reporters!(reporters)
99
+ return unless reporters.any? { |r| !Minitest::Reporters.reporters.include?(r) }
100
+
101
+ warn <<~WARNING
102
+ WARNING!
103
+
104
+ ci-queue requires several custom minitest reporters.
105
+ Please do not overwrite them.
106
+ If you have a statement in your test suite like this
107
+
108
+ Minitest::Reporters.use!(SomeReporter.new)
109
+
110
+ you should only run it when other reporters have not been configured
111
+ to avoid breaking ci-queue's functionality and getting false test summaries.
112
+
113
+ Use something like this:
114
+
115
+ if Minitest::Reporters.reporters.nil?
116
+ Minitest::Reporters.use!(SomeReporter.new)
117
+ end
118
+ WARNING
119
+ end
120
+
94
121
  def release_command
95
122
  require_worker_id!
96
123
  queue.release!
@@ -257,7 +284,7 @@ module Minitest
257
284
  private
258
285
 
259
286
  attr_reader :queue_config, :options, :command, :argv
260
- attr_accessor :queue, :queue_url, :grind_list, :grind_count, :load_paths
287
+ attr_accessor :queue, :queue_url, :grind_list, :grind_count, :load_paths, :verbose
261
288
 
262
289
  def require_worker_id!
263
290
  if queue.distributed?
@@ -421,7 +448,7 @@ module Minitest
421
448
  EOS
422
449
  opts.separator ""
423
450
  opts.on('-IPATHS', help) do |paths|
424
- self.load_paths = paths
451
+ self.load_paths = [load_paths, paths].compact.join(':')
425
452
  end
426
453
 
427
454
  help = <<~EOS
@@ -547,6 +574,10 @@ module Minitest
547
574
  queue.config.redis_ttl = time
548
575
  end
549
576
 
577
+ opts.on("-v", "--verbose", "Verbose. Show progress processing files.") do
578
+ self.verbose = true
579
+ end
580
+
550
581
  opts.separator ""
551
582
  opts.separator " retry: Replays a previous run in the same order."
552
583
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier